//[SecuredOperation("admin,individualCustomer.get,individualCustomer")]
        public IDataResult <IndividualCustomer> GetByEmail(string email)
        {
            var result = _individualCustomerDal.Get(c => c.Email == email);

            if (result != null)
            {
                return(new SuccessDataResult <IndividualCustomer>(result));
            }
            return(new ErrorDataResult <IndividualCustomer>(Messages.NotFound()));
        }
예제 #2
0
        public IDataResult <IndividualCustomer> GetById(int customerId)
        {
            var result = _individualCustomerDal.Get(c => c.Id == customerId);

            if (result != null)
            {
                return(new SuccessDataResult <IndividualCustomer>(result));
            }
            return(new ErrorDataResult <IndividualCustomer>(Messages.NotFound()));
        }