Esempio n. 1
0
        public ActionResult <List <Suscription> > Get(int id)
        {
            AppDB         db          = provider.GetRequiredService <AppDB>();
            SuscriptionDA suscription = new SuscriptionDA(db);

            return(suscription.getById(id));
        }
Esempio n. 2
0
        public ActionResult <List <Suscription> > Get()
        {
            AppDB         db          = provider.GetService <AppDB>();
            SuscriptionDA suscription = new SuscriptionDA(db);

            return(suscription.getAll());
        }
Esempio n. 3
0
        public ActionResult <object> Update(Suscription suscription)
        {
            AppDB         db            = provider.GetRequiredService <AppDB>();
            SuscriptionDA suscriptionDA = new SuscriptionDA(db);
            var           res           = suscriptionDA.update(suscription);

            return(new
            {
                result = res
            });
        }