public List <Models.AppModels.UserComplaint> Get(Models.AppModels.UserComplaint m) { //var blog = db.Blogposts.First(a=> a.id == m.id); var compaints = db.UserComplaints.AsQueryable(); return(compaints.ToList()); }
public Models.AppModels.UserComplaint Post(Models.AppModels.UserComplaint m) { //var blog = db.Blogposts.First(a=> a.id == m.id); if (ModelState.IsValid) { db.UserComplaints.Add(m); db.SaveChanges(); return(m); } else { return(null); } }