public PlaceLogic(ObjectContextEntities context, ICourtLogic courtLogic, ICourtBookLogic bookService, IFileLogic fileService, ILocationLogic locationService, UserAuthentication authentication) { _bookService = bookService; _fileService = fileService; _locationService = locationService; _authentication = authentication; _context = context; _courtLogic = courtLogic; }
internal static IEnumerable<Tuple<string, int>> GetTags(ObjectContextEntities context) { var regions = context.Places.GroupBy(p => p.Location.Region.Description).Select(p => new { p.Key, Count = p.Count(), }); var locations = context.Places.GroupBy(p => p.Location.Description).Select(p => new { p.Key, Count = p.Count(), }); return regions.Concat(locations).GroupBy(i => i.Key).Select(i => new { i.Key, Count = i.Sum(k => k.Count), }) .ToList() .Select(i => new Tuple<string, int>(i.Key, i.Count)); }
internal static IEnumerable<string> GetForAutocomplete(ObjectContextEntities context, string prefixText, int count) { return context.AutocompleteValues .Select(p => p.Value) .Distinct() .Where(p => p.Contains(prefixText)) .OrderBy(p => p.ToLower().IndexOf(prefixText.ToLower())) .ThenBy(p => p.Length) .Take(count) .ToList(); }
public FileLogic(ObjectContextEntities context) { _context = context; }
public UserLogic(ObjectContextEntities context) { _context = context; }
public FloorTypeLogic(ObjectContextEntities context) { _context = context; }
public TerritoryLogic(ObjectContextEntities context) { _context = context; }
public ClientLogic(ObjectContextEntities context) { _context = context; }
public CourtBookLogic(ObjectContextEntities context, IClientLogic clientService) { _clientService = clientService; _context = context; }