//[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())); }
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())); }