コード例 #1
0
 public HomeController(IOptions <Setting> settings, IHostingEnvironment hostingEnvironment, IConfiguration configuration, ILoggerFactory loggerFactory)
 {
     _context            = new modelContext(settings);
     _hostingEnvironment = hostingEnvironment;
     _configuration      = configuration;
     _logger             = loggerFactory.CreateLogger <HomeController>();
 }
コード例 #2
0
ファイル: AdminController.cs プロジェクト: ghaith17/Ecommerce
        public ActionResult viewUsers(modelContext model)
        {
            var data = DB.Users.ToList();

            DB.SaveChanges();
            return(View(data));
        }
コード例 #3
0
 public ActionResult Signup(User user)
 {
     using (var modelContext = new modelContext())
     {
         modelContext.Users.Add(user);
         modelContext.SaveChanges();
     }
     return(RedirectToAction("Login"));
 }
コード例 #4
0
 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());
     }
         );
 }
コード例 #5
0
 public RepositoryService(modelContext modelContext)
 {
     _modelContext = modelContext;
 }
コード例 #6
0
 public AttendeeService(modelContext modelContext) : base(modelContext)
 {
 }
コード例 #7
0
 public HomeController(IOptions <Setting> settings, IConfiguration configuration)
 {
     _context       = new modelContext(settings);
     _configuration = configuration;
 }
コード例 #8
0
ファイル: HomeController.cs プロジェクト: ghaith17/Ecommerce
        public ActionResult Index()
        {
            modelContext modelContext1 = new modelContext();

            return(View());
        }
コード例 #9
0
 public UserService(modelContext modelContext) : base(modelContext)
 {
 }
コード例 #10
0
 public MeetingService(modelContext modelContext) : base(modelContext)
 {
 }
コード例 #11
0
 public MeetingController(IMeetingService meetingService, IAttendeeService attendeeService, modelContext modelContext)
 {
     _meetingService   = meetingService;
     _attendeeService  = attendeeService;
     this.modelContext = modelContext;
 }