public DishType DTFromPOCO(DishTypeDto type) { return(new DishType() { ID = type.ID, Description = type.Description, Name = type.Name }); }
public DishType DTNewFromPOCO(DishTypeDto type) { return(new DishType() { Description = type.Description, Name = type.Name, Dishes = new List <Dish>() }); }
public void AddDishType(DishTypeDto dishType) { var disshType = new DishType { Id = dishType.TypeId, Description = dishType.Description }; _dishTypeRepository.Add(disshType); }
public ActionResult AddDishType(string dishTypeName) { try { var dishTypeDto = new DishTypeDto() { Name = dishTypeName, Description = dishTypeName }; dishService.CreateNewDishType(dishTypeDto); return(RedirectToAction("AddDish")); } catch (Exception exception) { return(new HttpStatusCodeResult(500)); } }
public void Insert(DishTypeDto dishType) { _platService.AddDishType(dishType); }