批量更新修改
This commit is contained in:
@@ -11,10 +11,12 @@ namespace IRaCIS.Application.Services
|
||||
public class TestService : BaseService
|
||||
{
|
||||
private readonly IRepository<Dictionary> _dicRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
|
||||
public TestService(IRepository<Dictionary> dicRepository)
|
||||
public TestService(IRepository<Dictionary> dicRepository,IRepository<Trial> trialRepository)
|
||||
{
|
||||
_dicRepository = dicRepository;
|
||||
_trialRepository = trialRepository;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@@ -25,11 +27,22 @@ namespace IRaCIS.Application.Services
|
||||
var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
|
||||
CultureInfo culture = CultureInfo.CurrentUICulture;
|
||||
|
||||
var dd= _dicRepository.UpdatePartialFields(Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
|
||||
u => new Dictionary() { ParentId = null, Code = "test" }, true).Result;
|
||||
//var dd= _dicRepository.UpdatePartialFields(Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
|
||||
// u => new Dictionary() { ParentId = null, Code = "test" }, true).Result;
|
||||
|
||||
var aaaa = _dicRepository.BatchDeleteAsync(t => t.Id == Guid.Empty).Result;
|
||||
|
||||
//var ggggg = _dicRepository.UpdateFromQueryAsync(t => t.ParentId == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"), u=>new Dictionary(){Code = "test"}).Result;
|
||||
|
||||
var ddd = _dicRepository.BatchUpdateAsync(t => t.Id == Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
|
||||
u => new Dictionary() { ParentId = null, Code = "test" }).Result;
|
||||
|
||||
|
||||
var d = _dicRepository.UpdateFromDTOAsync(new AddOrEditBasicDic() { Id = Guid.Parse("60d86683-c33b-4349-b672-08da1e91b622"), ParentId = null, ChildGroup = null, Code = null }, true, true).Result;
|
||||
var aaaaa= _trialRepository.BatchUpdateAsync(t => t.Id == Guid.Empty,
|
||||
u => new Trial { TrialCode = "test" }).Result;
|
||||
|
||||
|
||||
//var d = _dicRepository.UpdateFromDTOAsync(new AddOrEditBasicDic() { Id = Guid.Parse("60d86683-c33b-4349-b672-08da1e91b622"), ParentId = null, ChildGroup = null, Code = null }, true, true).Result;
|
||||
var a = 123;
|
||||
|
||||
var b = _localizer["test{0}", "测试"];
|
||||
|
||||
Reference in New Issue
Block a user