Example #1
0
 public async Task <IActionResult> GetProductDetailType()
 {
     try
     {
         return(Ok(new { results = _mapper.Map <IList <Models.Option> >(await _foodDetailBL.GetFoodDetailTypeByPremises(PremisesTypeDataConstant.FARM)) }));
     }
     catch (Exception ex)
     {
         return(BadRequest(new { message = MessageConstant.UNHANDLE_ERROR, error = ex.StackTrace }));
     }
 }
Example #2
0
 public async Task <IActionResult> GetProductProviderDetailType()
 {
     try
     {
         return(Ok(new { results = _mapper.Map <IList <Models.Option> >(await _foodDetailBL.GetFoodDetailTypeByPremises(PremisesTypeDataConstant.PROVIDER)) }));
     }
     catch (Exception e)
     {
         return(BadRequest(new { msg = e.Message }));
     }
 }