private void btAddColor_Click(object sender, EventArgs e) { Entities.Concrete.Color color = new Entities.Concrete.Color { ColorName = txColorName.Text }; _colorService.Add(color); }
public IActionResult Update(Entities.Concrete.Color color) { var result = _colorService.Update(color); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public IActionResult Delete(Color color) { var result = _colorService.Delete(color); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public IResult Update(Entities.Concrete.Color color) { try { _colorDal.Update(color); return(new SuccessResult(Messages.ColorUpdated)); } catch (Exception ex) { return(new ErrorResult(Messages.ColorCannotUpdated + Environment.NewLine + ex.Message)); } }
public IResult Update(Entities.Concrete.Color color) { _colorDal.Update(color); return(new SuccessResult(Messages.Updated)); }
public IResult Add(Entities.Concrete.Color color) { _colorDal.Add(color); return(new SuccessResult(Messages.Added)); }
public IResult Update(Color entity) { _colorDal.Update(entity); return(new SuccessResult(Messages.ColorUpdated)); }