public IResult UpdateChart(Guid chartId, UpdateChartInfoRequest request, Guid principal) { return(_chartRepository.UpdateInfo(chartId, request, principal).Success(() => { _session.SaveChanges(); return Result.Success(); })); }
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); })); }