コード例 #1
0
        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());
        }
コード例 #2
0
        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);
            }
        }