增加分类管理

This commit is contained in:
yubaolee
2017-11-29 21:32:55 +08:00
parent b7a72f62c0
commit c026f263f8
17 changed files with 490 additions and 16 deletions

View File

@@ -62,7 +62,10 @@ namespace OpenAuth.Repository
public void Add<T>(T entity) where T : Domain.Entity
{
entity.Id = Guid.NewGuid().ToString();
if (string.IsNullOrEmpty(entity.Id))
{
entity.Id = Guid.NewGuid().ToString();
}
Context.Set<T>().Add(entity);
}