public static IEnumerable <StatisticDto> GetOperations(string startDateString, string endDateString)
        {
            using (var context = new PawnShopContext())
            {
                MapperInitiliazer.InitializeStatistics();
                context.Users.Attach(LoginUser.User);

                var startDate = DateTime.Parse(startDateString);
                var endDate   = DateTime.Parse(endDateString);

                if (startDate > endDate)
                {
                    throw new InvalidOperationException("Invalid data provided.");
                }

                var operations =
                    context.CashOperations.Where(c => c.CashBox.Office.Name == LoginUser.User.Office.Name &&
                                                 (SqlFunctions.DateDiff("day", c.DateTime, startDate).Value <= 0 &&
                                                  SqlFunctions.DateDiff("day", c.DateTime, endDate).Value >= 0))
                    .OrderBy(c => c.DateTime)
                    .ProjectTo <StatisticDto>()
                    .ToList();

                return(operations);
            }
        }