public IActionResult GetAll(Customers customers) { var result = _customersService.GetAll(); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public IActionResult GetAll() { Thread.Sleep(3000); var result = _customersService.GetAll(); if (result.Success) { return(Ok(result)); } return(BadRequest(result.Message)); }
public IActionResult GetAllCustomers() { try { return(Ok(customersService.GetAll())); } catch (Exception e) { log.LogError(e.Message + "\nin:" + e.StackTrace); return(Problem(null)); } }
public ActionResult getAllCustomer() { try { List <Customers> customers = _customersService.GetAll().ToList(); return(Ok(customers)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IActionResult TestCustomers() { var result = _customersService.GetAll(); return(new JsonResult(result)); }
public IEnumerable <ICustomerModel> Get() { return(_customerService.GetAll()); }
public async Task <IWrappedResponse> Get() { var user = _userRepo.FindAll() .ProjectTo <User>(Mapper.ConfigurationProvider) .SingleOrDefault(); var isNotDplEmployee = AuthData.GetUserRole() != Common.Enumerations.UserRole.DplEmployee; if (!isNotDplEmployee) { user.Role = Common.Enumerations.UserRole.DplEmployee; } var customersServiceResponse = (IWrappedResponse <IEnumerable <Customer> >) await _customersService.GetAll(); var customers = isNotDplEmployee ? customersServiceResponse.Data : new Customer[] { }; var postingAccountsServiceResponse = (IWrappedResponse <IEnumerable <PostingAccount> >) await _postingAccountsService.GetAll(); var postingAccounts = isNotDplEmployee ? postingAccountsServiceResponse.Data : new PostingAccount[] { }; var permssions = isNotDplEmployee ? await _permissionsService.GetPermissions() : new UserPermission[] { }; user.Customers = customers; user.PostingAccounts = postingAccounts; user.Permissions = permssions; return(Ok(user)); }
public ActionResult All(string order) { IEnumerable <CustomerViewModel> customers = service.GetAll(order); return(this.View(customers)); }
public IActionResult Get() { var result = _customersService.GetAll(); return(Ok(result)); }
public IActionResult GetAll() { return(Ok(customerService.GetAll())); }
public Task <ActionResult <IEnumerable <Customer> > > Get() { return(_customersService.GetAll().Convert <IEnumerable <Customer> >(this)); }
public async Task <IActionResult> Get(CancellationToken cancellationToken = default) { var customers = await _customersService.GetAll(cancellationToken); return(Ok(customers)); }
public List <CustomersVM> getAll() { return(customerService.GetAll()); }