public IHttpActionResult DeleteStore(int storeId) { StoreManager storeManager = new StoreManager(); string message; var store = new StoreDto { Id = storeId }; if (storeManager.IsValid(MethodTypes.Delete, store, out message)) { if (storeManager.DeleteStore(store, out message)) { return(Ok()); } } ; return(BadRequest(message)); }
public ActionResult DeleteStore(Guid id) { StoreManager.DeleteStore(StoreManager.getStore(id)); return(RedirectToAction("ListStores", "Store")); }