コード例 #1
0
        public ReturnVM Update(OtherSettingView model)
        {
            var result = new ReturnVM();

            try
            {
                var entity = _repository.GetById(model.Id);
                entity.ModifiedOn = DateTime.Now;
                entity.Value      = model.Value;
                _repository.Update(entity);
                result.IsSuccess = true;
            }
            catch (Exception ex)
            {
                result.Message = ex.Message;
            }
            return(result);
        }
コード例 #2
0
 public IActionResult Put(int id, [FromBody] OtherSettingView model)
 {
     return(new ObjectResult(_otherSettingService.Update(model)));
 }