mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-09 19:04:44 +08:00
check issue #39
This commit is contained in:
@@ -75,13 +75,16 @@ namespace OpenAuth.Domain.Service
|
|||||||
|
|
||||||
public void AddOrUpdate(Module model)
|
public void AddOrUpdate(Module model)
|
||||||
{
|
{
|
||||||
ChangeModuleCascade(model);
|
|
||||||
if (model.Id == Guid.Empty)
|
if (model.Id == Guid.Empty)
|
||||||
{
|
{
|
||||||
|
ChangeModuleCascade(model);
|
||||||
_repository.Add(model);
|
_repository.Add(model);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//从数据库获取级联ID
|
||||||
|
model.CascadeId = _repository.FindSingle(o => o.Id == model.Id).CascadeId;
|
||||||
_repository.Update(model);
|
_repository.Update(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user