v0.0.14 and examples

This commit is contained in:
28810
2019-02-16 17:38:54 +08:00
parent 2ca55c3d15
commit 5cfc359b80
24 changed files with 402 additions and 34 deletions

View File

@ -0,0 +1,18 @@
using efcore_to_freesql.Entitys;
using Microsoft.EntityFrameworkCore;
namespace efcore_to_freesql.DBContexts {
public class Topic1Context : BaseDBContext {
public DbSet<Topic1> Topic1s { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder) {
modelBuilder.Entity<Topic1>().ToTable("topic1_sss").HasKey(a => a.Id);
modelBuilder.Entity<Topic1>().Property(a => a.Id).HasColumnName("topic1_id").ValueGeneratedOnAdd();
base.OnModelCreating(modelBuilder);
}
}
}