Fluent methods
Once you get past the generic and lambda syntax for entities and properties, the methods exposed by the configuration objects are pretty self-explanatory. Here’s a list of a few of the most common ones. Notice that in addition to the general Property
methods shown, each data type has some methods specific to it. A few of those are included in the list, as well. If you want the complete list, check MSDN for the classes defined in the System.Data.Entity.ModelConfiguration.Configuration
namespace. (Or just use Intellisense. It’s a whole lot easier.)
Modelbuilder methods
ModelBuilder.Ignore<TEntity>Modelbuild.Entity<T>
Entity methods
HasEntitySetName()HasKey<TProperty>()ToTable()
General property methods
HasColumnName()HasColumnOrder() ...
Get Fluent Entity Framework now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.