Esempio n. 1
0
        public string Delete(string id)
        {
            Tbstudent t = obj.Tbstudent.Find(id);

            obj.Entry(t).State = Microsoft.EntityFrameworkCore.EntityState.Deleted;
            obj.SaveChanges();
            return("1");
        }
Esempio n. 2
0
 public string Update([FromBody] Tbstudent tbstudent)
 {
     obj.Entry(tbstudent).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     obj.SaveChanges();
     return("1");
 }
Esempio n. 3
0
 public string Create([FromBody] Tbstudent tbstudent)
 {
     obj.Tbstudent.Add(tbstudent);
     obj.SaveChanges();
     return("1");
 }