更新过滤器更改
parent
099d76a53c
commit
7664a92e7e
|
@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
//public string ModuleType { get; set; } = String.Empty;
|
||||
|
||||
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
|
|
|
@ -191,6 +191,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> DeleteSiteCRC(Guid id, bool isDelete)
|
||||
{
|
||||
|
||||
|
||||
var isSuccess = await _trialSiteUserRepository.UpdateFromQueryAsync(u => u.Id == id, u => new TrialSiteUser()
|
||||
{ IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null });
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||
///CommonDocument
|
||||
///</summary>
|
||||
[Table("CommonDocument")]
|
||||
public class CommonDocument : Entity, IAuditUpdate, IAuditAdd
|
||||
public class CommonDocument : Entity, IAuditUpdate, IAuditAdd,ISoftDelete
|
||||
{
|
||||
|
||||
|
||||
|
@ -66,6 +66,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
[Required]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Code
|
||||
/// </summary>
|
||||
|
|
|
@ -250,7 +250,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
public async Task<bool> UpdateFromQueryAsync(Expression<Func<TEntity, bool>> where, Expression<Func<TEntity, TEntity>> updateFactory)
|
||||
{
|
||||
return await _dbSet.Where(where).UpdateFromQueryAsync(updateFactory) > 0;
|
||||
return await _dbSet.IgnoreQueryFilters().Where(where).UpdateFromQueryAsync(updateFactory) > 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue