Page Contents
ASP.NET Core Identity is a Toolkit and an API with which you can create Authorization and Authentication features in your application. Users can create an account and login with a user name and password. This also includes Roles and Roles Management. ASP.NET Core Identity uses a SQL Server Database to store user names, passwords, roles, and profile data.
(more…)
SQL Stored Procedures can be easily executed using the FromSqlRaw() & ExecuteSqlRawAsync() methods in Entity Framework Core. This tutorial will cover them in details.
(more…)
Entity Framework Core FromSqlRaw() method is used to Execute Raw SQL Queries including Parameterized Queries. This method returns an entity object. We use this method when we can't generate queries through LINQ or when EF Core generates inefficient queries.
(more…)
Entity Framework Core Many-to-Many Relationship is configured through Fluent API. We first add collection navigation property on both the entities and then add the join entity type with the UsingEntity() method.
(more…)
We can configure Entity Framework Core One-to-One Relationship by the use of Fluent API. The One-to-One Relationship is established by using the HasOne - WithOne pattern. Note that we can also create this relationship by using EF Core Conventions.
(more…)
Entity Framework Core One-to-Many Relationship is established between 2 entities by the use of Fluent APIs. This relationship is configured by the use of Has/With pattern.
(more…)
Entity Framework Core Fluent API is used to build model based on entity classes. We can also override the default Conventions of Entity Framework Core using Fluent API when targetting the database schema as Fluent API has higher precedence than conventions and data annotations.
(more…)
Entity Framework Core Configurations allow us to override the default conventions in order to create database schema and mappings. We already saw the concept of Conventions in Entity Framework Core where we understood how default conventions work. If we want to override the conventions then apply the configurations and customize the EF Core model to database mappings.
Page Contents
Entity Framework Core Conventions are default rules by which the Database Schema is created based on Entity classes and DbContext. For example - the table names, column names, relationships, primary & foreign keys are all created based on these conventions.
(more…)
Entity Framework Core API executes the DELETE statement in the database for the entities whose EntityState is set as Deleted. The Remove() method of the DbContext is used for deleting records from the database.
(more…)