public TypeModel UpdateType(UpdateTypeModel model) { var command = $@" UPDATE [Type] SET Name = @Name, [Description] = @Description, P2PPlayCount = @P2PPlayCount, IsContinuous = @IsContinuous WHERE Id = @Id"; var result = ExecCommand(command, model); if (result) { return new TypeModel { Id = model.Id, Name = model.Name, Description = model.Description } } ; return(null); }
public async Task <IActionResult> UpdateStoreType(Guid Id) { TempData["Id"] = Id; GetTypeModel storeTypeDetail = await _storeTypeService.GetStoreTypeDetail(Id); UpdateTypeModel storeType = _mapper.Map <UpdateTypeModel>(storeTypeDetail); return(PartialView(storeType)); }
public async Task <JsonResult> UpdateStoreType(Guid Id, UpdateTypeModel UpdateTypeModel) { HttpResponseMessage response = await _apiManager.PutAPI(ApisUrl.Store.UpdateStoreType, UpdateTypeModel, Id); return(response.CreateJsonResponse()); }
public TypeModel UpdateType(long id, [FromBody] UpdateTypeModel model) { model.Id = id; return(_typeLib.UpdateType(model)); }
public async Task <IActionResult> UpdateStoreType(UpdateTypeModel UpdateTypeModel) { return(await _storeTypeService.UpdateStoreType((Guid)TempData.Peek("Id"), UpdateTypeModel)); }