mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 02:29:24 +08:00
增加Oracle驱动
调整登录时应用判定
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OpenAuth.Repository.Domain;
|
||||
@@ -99,5 +100,31 @@ namespace OpenAuth.Repository.Test
|
||||
unitWork.Save();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MultiUpdate2()
|
||||
{
|
||||
var unitWork = _autofacServiceProvider.GetService<IUnitWork<OpenAuthDBContext>>();
|
||||
var users = unitWork.Find<User>(null).ToList();
|
||||
unitWork.ExecuteWithTransaction(()=>
|
||||
{
|
||||
foreach (var req in users)
|
||||
{
|
||||
unitWork.Update<User>(u =>u.Id == req.Id, user => new User
|
||||
{
|
||||
Name = "user_" + DateTime.Now.ToString("yyyy_MM_dd HH:mm:ss")
|
||||
});
|
||||
|
||||
|
||||
unitWork.Update<Org>(u => u.Id == "08f41bf6-4388-4b1e-bd3e-2ff538b44b1b", u => new Org
|
||||
{
|
||||
CreateTime = DateTime.Now
|
||||
});
|
||||
}
|
||||
|
||||
unitWork.Save();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user