public static Kortingcoupon FindByCode(string code) { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); return(kcr.RetrieveByCode(code)); }
public void Delete() { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); kcr.Delete("1"); }
public static Kortingcoupon Find(string key) { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); return(kcr.Retrieve(key)); }
public static List <Kortingcoupon> All() { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); return(kcr.RetrieveAll()); }
public void RetrieveAll() { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); List <Kortingcoupon> lijst = kcr.RetrieveAll(); Assert.AreEqual("Zomer10", lijst[0].Code); }
public void Retrieve() { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); Kortingcoupon k = kcr.Retrieve("1"); Assert.AreEqual("Zomer10", k.Code); }
public void Update() { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); Kortingcoupon k = kcr.Retrieve("1"); k.Code = "Zomer20"; k.Kortingspercentage = 20; kcr.Update(k); }
public void SaveOrUpdate() { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); if (Id != 0) { kcr.Update(this); } else { kcr.Create(this); } }
public void Create() { KortingcouponSQLContext ksc = new KortingcouponSQLContext(); KortingCouponRepository kcr = new KortingCouponRepository(ksc); Kortingcoupon k = kcr.Retrieve("1"); }