mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 02:29:24 +08:00
增加分类管理
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user