v0.0.13 #4 - 修复和丰富 ICodeFirst.ConfigEntity 方法;

- 增加 FreeSql.Extensions.EFCoreModelBuilder 扩展库,现实与 EFCore 实体共存;
- 增加 FreeSql.RESTful.Demo 示例项目;
This commit is contained in:
28810
2019-02-14 19:07:52 +08:00
parent 45bc234160
commit 488a6edd4d
18 changed files with 190 additions and 22 deletions

View File

@ -6,16 +6,24 @@ namespace FreeSql.Tests.DataAnnotations {
[Fact]
public void Fluent() {
g.mysql.CodeFirst
.ConfigEntity<TestFluenttb1>(a => {
a.Name("xxdkdkdk1").SelectFilter("a.Id22 > 0");
a.Property(b => b.Id).Name("Id22").IsIdentity(true);
a.Property(b => b.name).DbType("varchar(100)").IsNullable(true);
//.ConfigEntity<TestFluenttb1>(a => {
// a.Name("xxdkdkdk1").SelectFilter("a.Id22 > 0");
// a.Property(b => b.Id).Name("Id22").IsIdentity(true);
// a.Property(b => b.name).DbType("varchar(100)").IsNullable(true);
//})
.ConfigEntity(typeof(TestFluenttb1), a => {
a.Name("xxdkdkdk1222").SelectFilter("a.Id22 > 1");
a.Property("Id").Name("Id22dd").IsIdentity(true);
a.Property("Name").DbType("varchar(101)").IsNullable(true);
})
.ConfigEntity<TestFluenttb2>(a => {
a.Name("xxdkdkdk2").SelectFilter("a.Idx > 0");
a.Property(b => b.Id).Name("Id22").IsIdentity(true);
a.Property(b => b.name).DbType("varchar(100)").IsNullable(true);
});
})
;
var ddl1 = g.mysql.CodeFirst.GetComparisonDDLStatements<TestFluenttb1>();
var ddl2 = g.mysql.CodeFirst.GetComparisonDDLStatements<TestFluenttb2>();