public ActionResult <List <Suscription> > Get(int id) { AppDB db = provider.GetRequiredService <AppDB>(); SuscriptionDA suscription = new SuscriptionDA(db); return(suscription.getById(id)); }
public ActionResult <List <Suscription> > Get() { AppDB db = provider.GetService <AppDB>(); SuscriptionDA suscription = new SuscriptionDA(db); return(suscription.getAll()); }
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 }); }