public GetBuysSummaryResponse GetBuysSummary() { var getBuysSummaryResponse = new GetBuysSummaryResponse(); try { getBuysSummaryResponse = _buyDataAccess.GetBuysSummary(); } catch (Exception ex) { Console.WriteLine("BuyModel.GetBuysSummary : ERROR : " + ex.Message); // Error interno del servidor throw; } return(getBuysSummaryResponse); }
public GetBuysSummaryResponse GetBuysSummary() { var getBuysSummaryResponse = new GetBuysSummaryResponse(); try { var query = from b in context.BuysEntity select b; getBuysSummaryResponse.BuysEntites = query.ToList(); } catch (Exception ex) { Console.WriteLine("BuyDataAccess.GetBuysSummary : ERROR : "+ex.Message); throw; } return getBuysSummaryResponse; }