Example #1
0
        public BaseController()
        {
            DbContext = new OrganizerDbContext();
            Logger    = LogManager.GetCurrentClassLogger();

            ConfigureAutoMapper();
        }
 public PostgresProvider(
     OrganizerDbContext context,
     ILogger <PostgresProvider> logger)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
     _logger  = logger ?? throw new ArgumentNullException(nameof(logger));
 }
        // GET: Customer
        public ActionResult ListCustomers(string search, int?Page)
        {
            OrganizerDbContext db = new OrganizerDbContext();
            var customerQ         = from c in db.Customers select c;

            if (!String.IsNullOrEmpty(search))
            {
                customerQ = customerQ.Where(c => c.Firstname.Contains(search) || c.Lastname.Contains(search));
            }
            List <Customer> customers = db.Customers.ToList();

            return(View(db.Customers.Where(c => c.Firstname.Contains(search) || c.Lastname.Contains(search) || search == null).ToList().ToPagedList(Page ?? 1, 3)));
        }
Example #4
0
 protected Service(OrganizerDbContext context)
 {
     this.Context = context;
 }
Example #5
0
 public AdminService(OrganizerDbContext context) : base(context)
 {
 }
Example #6
0
 public GroupService(OrganizerDbContext context) : base(context)
 {
 }
Example #7
0
 public UsersController(OrganizerDbContext context)
 {
     _context = context;
 }
Example #8
0
 public TaskService(OrganizerDbContext context) : base(context)
 {
 }
Example #9
0
 public CalendarsController(OrganizerDbContext context)
 {
     _context = context;
 }