예제 #1
0
 public async Task <IActionResult> getAllTransaction()
 {
     try
     {
         int premisesId = int.Parse(User.Claims.First(c => c.Type == "premisesID").Value);
         return(Ok(new { data = _mapper.Map <IList <Models.TransactionReponse.FarmGetTransaction> >(await _transactionBL.getAllFarmTransaction(premisesId)) }));
     }
     catch (Exception e)
     {
         return(BadRequest(new { message = e.Message }));
     }
 }