public int CreateCategories(CategorieBLL categorie) { int proposedReturnValue = -1; proposedReturnValue = _context.CreateCategorie(categorie.CategorieID, categorie.Categorie); return(proposedReturnValue); }
//Categorie public CategorieBLL FindCategorieByID(int categorieID) { CategorieBLL ProposedReturnValue = null; CategorieDal DataLayerObject = _context.FindCategorieByID(categorieID); if (null != DataLayerObject) { ProposedReturnValue = new CategorieBLL(DataLayerObject); } return(ProposedReturnValue); }
public List <CategorieBLL> GetCategorie(int skip, int take) { List <CategorieBLL> ProposedReturnValue = new List <CategorieBLL>(); List <CategorieDal> ListOfDataLayerObjects = _context.GetCategories(skip, take); foreach (CategorieDal categorie in ListOfDataLayerObjects) { CategorieBLL BusinessObject = new CategorieBLL(categorie); ProposedReturnValue.Add(BusinessObject); } return(ProposedReturnValue); }
public ActionResult Delete(int id, BusinessLogicLayer.CategorieBLL collection) { try { using (ContextBll ctx = new ContextBll()) { ctx.DeleteCategories(id); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public ActionResult Create(BusinessLogicLayer.CategorieBLL collection) { try { // TODO: Add insert logic here using (ContextBll ctx = new ContextBll()) { ctx.CreateCategories(collection); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }
public void DeleteCategirie(CategorieBLL categorie) { _context.DeleteCategorie(categorie.CategorieID); }
public void UpdateCategories(CategorieBLL categorie) { _context.UpdateCategori(categorie.CategorieID, categorie.Categorie); }