예제 #1
0
        public BaseResponse DeleteApplicationLogging(ComplexApplicationLogging applicationLogging)
        {
            BaseResponse response = new BaseResponse();

            try
            {
                if (!string.IsNullOrEmpty(applicationLogging.Type))
                {
                    string[] arr = applicationLogging.Type.Split(',');
                    foreach (var item in arr)
                    {
                        _applicationLoggingRepository.DeleteMulti(x => x.CreatedOn.Day >= applicationLogging.FromDate.Day && x.CreatedOn.Month >= applicationLogging.FromDate.Month && x.CreatedOn.Year >= applicationLogging.FromDate.Year && x.CreatedOn.Day <= applicationLogging.ToDate.Day && x.CreatedOn.Month <= applicationLogging.ToDate.Month && x.CreatedOn.Year <= applicationLogging.ToDate.Year && x.ModelName == item);
                    }
                }
                else
                {
                    _applicationLoggingRepository.DeleteMulti(x => x.CreatedOn.Day >= applicationLogging.FromDate.Day && x.CreatedOn.Month >= applicationLogging.FromDate.Month && x.CreatedOn.Year >= applicationLogging.FromDate.Year && x.CreatedOn.Day <= applicationLogging.ToDate.Day && x.CreatedOn.Month <= applicationLogging.ToDate.Month && x.CreatedOn.Year <= applicationLogging.ToDate.Year);
                }
            }
            catch (Exception ex)
            {
                response.Message   = ex.Message;
                response.IsSuccess = false;
            }
            return(response);
        }
 public BaseResponse Delete(ComplexApplicationLogging applicationLogging)
 {
     return(shareService.DeleteApplicationLogging(applicationLogging));
 }