I am using code first approach in a ASP.NET MVC 3 application and all integer primary keys in models (public int Id { get; set; }) are by default configured as
public int Id { get; set; }
If you want to use fluent api with EntityFramework Core 2.0 you write:
modelBuilder.Entity<*myEntity*>() .Property(e => e.*myFieldname*) .ValueGeneratedNever();