Ejemplo n.º 1
0
 public List <Shop> GetShopList()
 {
     using (var dbcontext = new YemekSepetiDbContext())
     {
         return(dbcontext.ShopSet.ToList());
     }
 }
Ejemplo n.º 2
0
        public void Save(ShopAggregate aggregate)
        {
            var saleItem = aggregate.GetSale();

            using (var db = new YemekSepetiDbContext())
            {
                db.SaleSet.Add(saleItem);
                db.SaveChanges();
            }
        }