D
D
Dmitry Gavrilenko2015-03-30 10:26:19
.NET
Dmitry Gavrilenko, 2015-03-30 10:26:19

CodeFirst and EF?

After reading a couple of articles, the essence of CodeFirst when working with EF became clear. But here's what's interesting.
Let's say I have a User table in the database with the fields ID, LastName, Age, and the table already has data.
When creating the User entity class, I must create the properties ID, LastName, Age?
At what stages can I change the property itself to Name?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Mozhaykin, 2015-03-30
@Maddox

Properties can be different than field names. Mapping can be set, for example, using the Fluent API: https://msdn.microsoft.com/en-us/data/jj591617.aspx#1.7

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question