public IDataResult <List <Customer> > GetAll() { if (DateTime.Now.Hour == 23) { return(new ErrorDataResult <List <Customer> >(Messages.MaintenanceTime)); } return(new SuccessDataResult <List <Customer> >(_customerDAL.GetAll(), Messages.UsersListed)); }
public Customers Add(Customers entity) { try { var customer = _CustomerDAL.GetAll(); var IsThere = (from c in customer where c.Email == entity.Email && c.FirstName == entity.FirstName && c.LastName == entity.LastName select c.ID).FirstOrDefault(); if (IsThere == 0) { _CustomerDAL.Add(entity); return(entity); } else { return(Get(IsThere)); } } catch (Exception) { return(entity); } }
public IDataResult <List <NCustomer> > GetAll() { return(new SuccessDataResult <List <NCustomer> >(_iCustomerDal.GetAll())); }
public IDataResult <List <Customer> > GetAll() { return(new SuccessDataResult <List <Customer> >(_customerDAL.GetAll())); }
public IDataResult <List <Customer> > GetAll() { return(new SuccessDataResult <List <Customer> >(_customerDAL.GetAll(), Messages.CustomersListed)); }
public IEnumerable <Course> GetAll() { return(customerDAL.GetAll()); }
public IDataResult <List <Customer> > GetAll() { return(new SuccessDataResult <List <Customer> >(_iCustomerDal.GetAll(), Messages.ListAll)); }
public async Task <IEnumerable <CustomerViewModel> > GetAll() { return(await _CustomerDAL.GetAll()); }