コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
 public async Task <ActionResult> GetWarehousesThatStoresCatalogWithSpecificName(Guid catalogNameId)
 {
     return(Ok(await CatalogNameService.GetWarehousesThatHasCatalogsWithSpecificName(catalogNameId)));
 }