Entity Framework Core 6 - Pre-Convention Model Configuration (NEW)

preview_player
Показать описание

In this video we will see the pre-convention model configuration in which we can redefine some of the default conventions of EF Core.
Рекомендации по теме
Комментарии
Автор

Really nice channel, very useful information.

mihaimyh
Автор

Dear Sir,
you r one of the best tutors i found ever in youtube channel for .net.

sir, here i want to create custom field with all the conventions and validations globally like

NameField (nvarchar(100), MinLength(5), MaxLength(100))
AddressField (nvarchar(200), MinLength(5), MaxLength(200))
AgeField (int, MinValue(20), MaxValue(50))

and so on so that we can create fields just like below:-

public NameField StudentName{get;set;}
public AddressField StudentAddress{get;set;}

so that if any values not valid
even when setting in in compile time
like StudentName="Hi" should through an error.

can you please help us doing so ?

Regards-
Sanjeeb

hintsoftware
Автор

Thanks for the useful video. I want to ask that is it possible to implement this configuration to the database first approach?

cemkaya
Автор

Very useful and succinct. I assume that you can also use Annotations in the model class to override the convention.

iancarr
Автор

sir, you only enjoy your appraisal type of comments.
why not replying to some real type of query to solve ?
we are expecting your reply as well as solution sir ?

hintsoftware