Exemplo n.º 1
0
        public async Task <IActionResult> FireEmployee(Guid employeeId)
        {
            var result = await ShopEmployeeService.Deactivate(employeeId);

            if (!result)
            {
                return(BadRequest(ApiResponse.Failure("Fire", "Employee does not seem to exist")));
            }

            return(Ok(ApiResponse.Success()));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Get()
        {
            var employees = await ShopEmployeeService.GetAll();

            return(Ok(ApiResponse <IEnumerable <EmployeeForListFlat> > .Success(employees)));
        }