Ejemplo n.º 1
0
 public Result Add(UploadDto dto)
 {
     try
     {
         var up  = dto.MapTo <UploadEntity>();
         var rlt = UnitOfWorkService.Execute(() => _uploadRepository.InsertAndGetId(up));
         return(rlt > 0 ? new Result(true, "") : new Result {
             Status = false
         });
     }
     catch (Exception ex)
     {
         Logger.Error($" add upload to exception:{ex}");
         return(new Result {
             Status = false, Message = ex.Message
         });
     }
 }