public static ChartData GetSummaryOfProfits(ChartRequestObject chartLetter)
        {
            var chartData = new ChartData();
            var list = new List<int>();

            using (var db = new DB_Context())
            {
                foreach (var deal in db.Deals)
                {
                    if (deal.DateOfDeal >= chartLetter.from && deal.DateOfDeal <= chartLetter.to)
                    {
                        list.Add(deal.ObjectOfTransactionID);
                    }
                }

                for (int i = 0; i < list.Count; i++)
                {
                    var obj = GetObjectOfTransactionFromDbById(list[i]);
                    chartData.SetValueByProp((EnumObjectType)obj.ObjectTypeID,obj.Cost);
                }
            }
            return chartData;
        }
 public ChartData GetSummaryOfProfits(ChartRequestObject chartLetter)
 {
     return DataManager.GetSummaryOfProfits(chartLetter);
 }