I use EF Core, inside my dbcontext class I have overridden the onModelCreating method to configure one property in a class to be auto-increment in SQL Server.
This is my DbContext class:
public class AppDbContext:IdentityDbContext<AppUser>
{
public AppDbContext(DbContextOptions options) : base(options)
{
}
public AppDbContext()
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.Entity<Service>()
.Property(service => service.ID)
.UseIdentityColumn(1, 1);
}
public virtual DbSet<AppUser> AppUsers { get; set; }
public virtual DbSet<Service> Services { get; set; }
}
If you notice that my DbContext class is inheriting from IdentityDbContext because I use identity.
The problem: I get this error:
CS0121
The call is ambiguous between the following methods or properties: 'Microsoft.EntityFrameworkCore.OraclePropertyBuilderExtensions.UseIdentityColumn(Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder, int, int)' and 'Microsoft.EntityFrameworkCore.SqlServerPropertyBuilderExtensions.UseIdentityColumn(Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder, int, int)'
Additional info
I reference another project in my solution this project will play the repository role, and he prepared to work with SQL Server, Oracle and MySQL.
The project I depend on is my own project, and it is open source that is the repository link
Please any help to fix this issue?