Exemple #1
0
        public IHttpActionResult DeleteBank(int id)
        {
            Bank bank = db.Banks.Find(id);

            if (bank == null)
            {
                return(NotFound());
            }

            db.Banks.Remove(bank);
            db.SaveChanges();

            return(Ok(bank));
        }
        public IHttpActionResult DeleteBranch(int id)
        {
            Branch branch = db.Branches.Find(id);

            if (branch == null)
            {
                return(NotFound());
            }

            db.Branches.Remove(branch);
            db.SaveChanges();

            return(Ok(branch));
        }
Exemple #3
0
        public IHttpActionResult DeleteUser(int id)
        {
            User user = db.Users.Find(id);

            if (user == null)
            {
                return(NotFound());
            }

            db.Users.Remove(user);
            db.SaveChanges();

            return(Ok(user));
        }
        public IHttpActionResult DeleteRating(int id)
        {
            Rating rating = db.Ratings.Find(id);

            if (rating == null)
            {
                return(NotFound());
            }

            db.Ratings.Remove(rating);
            db.SaveChanges();

            return(Ok(rating));
        }