public async Task <ActionResult> SaveCatalogName([FromBody] CatalogName catalogName) { var username = User.Claims.FirstOrDefault(x => x.Type == "FullName").Value; var name = await CatalogNameService.SaveCataogName(catalogName, username); return(Ok(name)); }
public async Task <ActionResult> FilterWarehouses([FromBody] FilterSorting filterSorting) { // Filtering warehouse query by calling method that will filter it var filteredCatalogList = await CatalogNameService.FilterCatalogName(filterSorting); // Returning filtered warehouse list return(Ok(filteredCatalogList)); }
public async Task <ActionResult> Get(Guid id) { var cataqlogNameList = await CatalogNameService.GetCatalogNameList(id); if (cataqlogNameList.Count == 0) { return(BadRequest(new { message = "There is no catalog names." })); } return(Ok(cataqlogNameList)); }
public async Task <ActionResult> GetWarehousesThatStoresCatalogWithSpecificName(Guid catalogNameId) { return(Ok(await CatalogNameService.GetWarehousesThatHasCatalogsWithSpecificName(catalogNameId))); }