Esempio n. 1
0
        public T Create(T entity)
        {
            var val = db.Set <T>().Add(entity);

            db.SaveChanges();
            return(val);
        }
Esempio n. 2
0
        public override Payment GetById(long id)
        {
            var payrec = db.Set <Payment>().FirstOrDefault(c => c.PayId == id);

            return(payrec);
        }
Esempio n. 3
0
 public GenRepository()
 {
     db    = new PayProcessorContext();
     dbSet = db.Set <T>();
 }
        public override PaymentState GetById(long id)
        {
            var PayState = db.Set <PaymentState>().FirstOrDefault(c => c.PayId == id);

            return(PayState);
        }