Skip to content

Ormlite and EF Core #94

Closed Answered by mythz
tanczosm asked this question in Q&A
Discussion options

You must be logged in to vote

OrmLite also uses snake_case by default in its PostgreSqlNamingStrategy.cs so it should be able to query the AspNetUsers table with a similar EF snake_case naming convention, however since it's using a different implementation there may be corner cases that differ.

Whenever it does differ you can use OrmLite's [Alias] attribute on Tables or columns to force it use a specific name, e.g:

[Alias("asp_net_users")]
public class AppUser : IdentityUser<int>
{
    [Alias("display_name")]
    public string DisplayName { get; set; }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tanczosm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants