public HomeController(IOptions <Setting> settings, IHostingEnvironment hostingEnvironment, IConfiguration configuration, ILoggerFactory loggerFactory) { _context = new modelContext(settings); _hostingEnvironment = hostingEnvironment; _configuration = configuration; _logger = loggerFactory.CreateLogger <HomeController>(); }
public ActionResult viewUsers(modelContext model) { var data = DB.Users.ToList(); DB.SaveChanges(); return(View(data)); }
public ActionResult Signup(User user) { using (var modelContext = new modelContext()) { modelContext.Users.Add(user); modelContext.SaveChanges(); } return(RedirectToAction("Login")); }
public productoquery(modelContext context) { this._context = context; Field <ListGraphType <productotype> >( "Productos", arguments: new QueryArguments(new List <QueryArgument> { new QueryArgument <IdGraphType> { Name = "id" } }), resolve: context => { var ProductId = context.GetArgument <int?>("id"); if (ProductId.HasValue) { var res = _context.Products.Where(l => l.ProductId == ProductId).ToListAsync(); return(res); } return(_context.Products.ToListAsync()); } ); }
public RepositoryService(modelContext modelContext) { _modelContext = modelContext; }
public AttendeeService(modelContext modelContext) : base(modelContext) { }
public HomeController(IOptions <Setting> settings, IConfiguration configuration) { _context = new modelContext(settings); _configuration = configuration; }
public ActionResult Index() { modelContext modelContext1 = new modelContext(); return(View()); }
public UserService(modelContext modelContext) : base(modelContext) { }
public MeetingService(modelContext modelContext) : base(modelContext) { }
public MeetingController(IMeetingService meetingService, IAttendeeService attendeeService, modelContext modelContext) { _meetingService = meetingService; _attendeeService = attendeeService; this.modelContext = modelContext; }