Inheritance: IEntity
示例#1
0
 private void btAddColor_Click(object sender, EventArgs e)
 {
     Entities.Concrete.Color color = new Entities.Concrete.Color
     {
         ColorName = txColorName.Text
     };
     _colorService.Add(color);
 }
示例#2
0
        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));
        }
示例#4
0
 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));
     }
 }
示例#5
0
 public IResult Update(Entities.Concrete.Color color)
 {
     _colorDal.Update(color);
     return(new SuccessResult(Messages.Updated));
 }
示例#6
0
 public IResult Add(Entities.Concrete.Color color)
 {
     _colorDal.Add(color);
     return(new SuccessResult(Messages.Added));
 }
示例#7
0
 public IResult Update(Color entity)
 {
     _colorDal.Update(entity);
     return(new SuccessResult(Messages.ColorUpdated));
 }