zzz projects Entity Framework Core EF Core
Home EF Core 5 Articles Knowledge Base Online Examples
  • Home
  • EF Core 5
  • Articles
  • Knowledge Base
  • Online Examples

Articles

7 results for:

Code First

Code First...If you have used Entity Framework in the past, you will probably have heard about the ...Code First... approach....Code First workflow begins with classes that describe the conceptual model and then Entity Framework generate a database from that model automatically....Code first approach offers most control over the final appearance of the application code and the resulting database....To start using Entity Framework, use the following steps;...The first step is to create a new proj...
code-first model approach migration command-line

Data Annotations

Data Annotations...In .NET Framework, data annotation add extra meaning to the data by adding attribute tags. It is used to configure the classes which will highlight the most commonly needed configurations....Data Annotations attributes are .NET attributes which can be applied to an entity class or properties to override default CodeFirst conventions in EF6 and EF Core....The advantage of using Data Annotation feature is that by applying Data Attributes, we can manage the data definition in a s...
code-first data-annotation fluent-mapping

Explicit Values

Explicit Values...Explicit Values for Generated Properties...A property whose value is generated either by Entity Framework or the database when the entity is added or updated is known as generated property. In some cases, you might want to set an explicit value for a generated property, rather than having one generated....Here is a simple model which contains a single ...Order... entity....public class Order { public int OrderID { get; set; } public int CustomerID { get; set; } publ...
code-first fluent-mapping model

Fluent API

Fluent API...Fluent API specify the model configuration that you can with data annotations as well as some additional functionality that can not be possible with data annotations....In Entity Framework Core, the ModelBuilder class acts as a Fluent API....We can configure many different things by using it because it provides more configuration options than data annotation attributes....Data annotations and the fluent API can be used together, but precedence of ...Fluent API > data annotations > d...
code-first fluent-mapping model

Inheritance

Inheritance...What is Inheritance Type in Entity Framework?...Entity Framework code first creates tables for each concrete domain class. You can also design your domain classes using inheritance....In Object-oriented programming, we can include ..."has a"... and ..."is a"... relationship, whereas in a SQL-based relational model we have only a ..."has a"... relationship between tables and there is no support for type inheritance....So, how would you map object-oriented domain classes with the rel...
code-first inheritance fluent-mapping

Migrations

Migrations...Migrations provide a way to incrementally apply schema changes to the database to keep it in sync with your EF Core model while preserving existing data in the database....When start developing your applications, you will most likely see changes in your model with change in requirements....When there is a change in a model, we need to keep the database in sync with the model....The migrations feature enables you to make changes to your model and then propagate those changes to your ...
code-first migration command-line

Relationships

Relationships...In relational databases, a relationship exists between two tables through foreign keys. A Foreign Key is a column or combination of columns that are used to establish and enforce a link between the data in those two tables. Entity framework Core supports three types of relationships;...One-to-Many...One-to-One...Many-to-Many...One-to-Many Relationship...In a one-to-many relationship, each table has a primary key that uniquely defines each row within the table. The easiest way to ...
code-first relationship fluent-mapping

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79