예제 #1
0
        // DELETE: api/Theater/5
        public void Delete(int id)
        {
            T_Theater data = thetobj.T_Theater.Find(id);

            thetobj.T_Theater.Remove(data);
            thetobj.SaveChanges();
        }
예제 #2
0
        public ResponseData addtheater(T_Theater theater)
        {
            var result = thetobj.T_Theater.Add(theater);

            thetobj.SaveChanges();

            if (result != null)
            {
                res.Data   = result;
                res.Status = "Success";
                res.Error  = null;
                return(res);
            }

            else
            {
                res.Data   = result;
                res.Status = "Fail";
                res.Error  = null;
                return(res);
            }
        }