Exemple #1
0
 public static void DeleteSaleInfoFromId(int id)
 {
     using (var db = new MVPOnBoardAPIContext())
     {
         db.Sales.Remove(SaleDAL.GetSaleFromId(id));
         db.SaveChanges();
     }
 }
 public void Create(Sales sale)
 {
     SaleDAL.CreateSaleInfo(sale);
 }
 public void Update(Sales sale)
 {
     SaleDAL.UpdateSaleInfoFromId(sale);
 }
 public void Delete(int id)
 {
     SaleDAL.DeleteSaleInfoFromId(id);
 }
 public Sales Edit(int id)
 {
     return(SaleDAL.GetSaleFromId(id));
 }
        public IEnumerable <Sales> Index()
        {
            var tempList = SaleDAL.GetAllSales();

            return(tempList);
        }