示例#1
0
 public IResult UpdateChart(Guid chartId, UpdateChartInfoRequest request, Guid principal)
 {
     return(_chartRepository.UpdateInfo(chartId, request, principal).Success(() =>
     {
         _session.SaveChanges();
         return Result.Success();
     }));
 }
示例#2
0
 public Result <Chart> UpdateInfo(Guid id, UpdateChartInfoRequest request, Guid principal)
 {
     return(ById(id).Success(v =>
     {
         _mapper.Map(request, v);
         v.ModifiedOn = DateTime.UtcNow;
         v.ModifiedBy = principal;
         return Result.Success(v);
     }));
 }