mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-16 16:50:54 +08:00
Routine update
This commit is contained in:
parent
e4305be038
commit
b5804105ed
@ -63,7 +63,7 @@ namespace OpenAuth.Repository
|
||||
public void Update(T entity)
|
||||
{
|
||||
var entry = this.Context.Entry(entity);
|
||||
|
||||
//todo:如果状态没有任何更改,会报错
|
||||
entry.State = EntityState.Modified;
|
||||
|
||||
Save();
|
||||
|
@ -120,7 +120,8 @@ namespace OpenAuth.UnitTest
|
||||
[TestMethod]
|
||||
public void TestEdit()
|
||||
{
|
||||
|
||||
var module = _app.Find(7);
|
||||
_app.AddOrUpdate(module);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
Loading…
Reference in New Issue
Block a user