public string Delete(string id) { Tbstudent t = obj.Tbstudent.Find(id); obj.Entry(t).State = Microsoft.EntityFrameworkCore.EntityState.Deleted; obj.SaveChanges(); return("1"); }
public string Update([FromBody] Tbstudent tbstudent) { obj.Entry(tbstudent).State = Microsoft.EntityFrameworkCore.EntityState.Modified; obj.SaveChanges(); return("1"); }
public string Create([FromBody] Tbstudent tbstudent) { obj.Tbstudent.Add(tbstudent); obj.SaveChanges(); return("1"); }