コード例 #1
0
        public void DeleteUser(int id)
        {
            var user = _usersLogic.GetUser(id);

            if (user != null)
            {
                _usersLogic.DeleteUser(id);
            }
        }
コード例 #2
0
 public static void DeleteUser(Users user)
 {
     if (_usersLogic.DeleteUser(user))
     {
         List <Blogs> ListBlogs = new List <Blogs>();
         ListBlogs = BlogsPL.GetUserBlogs(user);
         List <Cars> ListCars = new List <Cars>();
         ListCars = CarsPL.GetUserCars(user);
         foreach (var item in ListBlogs)
         {
             BlogsPL.DeleteBlogUser(item, user.Nickname);
         }
         foreach (var item in ListCars)
         {
             CarsPL.DeleteCar(item);
         }
     }
 }
コード例 #3
0
        public IHttpActionResult Delete(Guid id)
        {
            _data.DeleteUser(id);

            return(Ok("User Deleted"));
        }