Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature classMap vs Attributes #396

Closed
auriou opened this issue Jul 7, 2023 · 1 comment
Closed

feature classMap vs Attributes #396

auriou opened this issue Jul 7, 2023 · 1 comment

Comments

@auriou
Copy link

auriou commented Jul 7, 2023

Is there a possibility to configure the classes without going through the attributes, but to configure them at the start of the application as the Mongodb driver does with its BsonClassMap or ModelBuilder class on EntityFramework?

BsonClassMap.RegisterClassMap<Person>(classMap =>
{
    classMap.MapMember(p => p.Name);
    classMap.MapMember(p => p.Age);
    classMap.MapMember(p => p.Hobbies);
});


 protected override void OnModelCreating(ModelBuilder modelBuilder)
{
     modelBuilder.Entity<Blog>()
         .Property(b => b.Url)
         .IsRequired();
}
@slorello89
Copy link
Member

Duplicate of #242 / #196 - probably something we'll add eventually, but no immediate plans to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants