Example #1
0
        public async Task <ActionResult <Material> > Get(string id)
        {
            var result = await _materialRepo.Get(id);

            if (result == null)
            {
                return(NotFound(new { Error = "Material ID not found" }));
            }
            return(Ok(result));
        }
Example #2
0
        public async Task <ActionResult <Stok> > GetStok(string id)
        {
            var result = await _stokRepo.Get(id);

            if (result == null)
            {
                return(NotFound("Material not found"));
            }
            return(Ok(result));
        }