public IHttpActionResult GetAllDepartments(FilterDepartments filter)
        {
            if (filter == null)
            {
                filter             = new FilterDepartments();
                filter.PageSize    = 25;
                filter.CurrentPage = 1;
            }
            var response = repository.GetDepartments(filter, CurrentBusinessId);

            return(Ok <DataResponse <EntityList <EntityDepartments> > >(response));
        }
Ejemplo n.º 2
0
        public IHttpActionResult GetByFilter(FilterDepartments filter)
        {
            var repository = new RepositoryDepartments();

            if (filter == null)
            {
                filter = new FilterDepartments {
                    PageSize = 25, CurrentPage = 1
                }
            }
            ;
            var response = repository.GetDepartments(filter, CurrentBusinessId.Value);

            return(Ok <DataResponse <EntityList <EntityDepartments> > >(response));
        }