Esempio n. 1
0
        public IActionResult Add(User user)
        {
            var result = _userService.Add(user);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
        public async Task <IActionResult> Index(Core.Entities.Concrete.User user)
        {
            if (user != null)
            {
                var result = await Login(user.Email, user.Password);

                if (result.Success)
                {
                    TempData["Email"] = user_email;
                    return(Redirect("/Chat"));
                }
                else
                {
                    ViewBag.Result  = result.Success;
                    ViewBag.Message = result.Message;
                    return(View());
                }
            }
            return(View());
        }
Esempio n. 3
0
 public IResult Update(User user)
 {
     _userDal.Update(user);
     return(new SuccessResult(Messages.ProductUpdate));
 }
Esempio n. 4
0
 public IDataResult <List <OperationClaim> > GetClaims(User user)
 {
     return(new SuccessDataResult <List <OperationClaim> >(_userDal.GetClaims(user), Messages.OperationClaimsListed));
 }
Esempio n. 5
0
 public IResult Delete(User user)
 {
     _userDal.Delete(user);
     return(new SuccessResult(Messages.ProductDelete));
 }
Esempio n. 6
0
 public IResult Add(User user)
 {
     _userDal.Add(user);
     return(new SuccessResult(Messages.ProductAdded));
 }
Esempio n. 7
0
 public IResult Update(User entity)
 {
     _userDal.Update(entity);
     return(new SuccessResult(Messages.Updated));
 }
Esempio n. 8
0
 public IResult Delete(User entity)
 {
     _userDal.Delete(entity);
     return(new SuccessResult(Messages.Deleted));
 }
Esempio n. 9
0
 //  [ValidationAspect(typeof(UserValidator))]
 public IResult Add(User entity)
 {
     _userDal.Add(entity);
     return(new SuccessResult(Messages.Added));
 }
Esempio n. 10
0
 public IResult Add(Core.Entities.Concrete.User user)
 {
     _userDal.Add(user);
     return(new SuccessResult(Messages.UserAdded));
 }
Esempio n. 11
0
 public void Add(Core.Entities.Concrete.User user)
 {
     _userDal.Add(user);
 }