public ActionResult Edit(int id) { ViewData["IDShop"] = id; var shop = _shopLogic.GetShopById(id); return(View(Mapper.Map <ShopCreateVM>(shop))); }
public void AddShop() { var oldShop = new Common.Shop() { NameShop = "Lime", Address = "Зарубина", DescriptionShop = "Кафе", Website = "lime.ru", Rating = 0, PhoneShop = "+7909323232", City = "Saratov", OpeningHours = "9:00-21:00" }; int id = logic.AddShop(oldShop); var shop = logic.GetShopById(id); Assert.IsNotNull(shop, "Shop is null"); Assert.AreEqual(Common.Shop.ToString(oldShop), Common.Shop.ToString(shop), "Не совпали названия магазинов при добавлении"); }
public void DeleteShop(int idShop) { _shopLogic.DeleteShop(_shopLogic.GetShopById(idShop), out var alert); }