示例#1
0
        public KbarticleController(WapiDBContext context)
        {
            _context = context;

            if (_context.Kbarticle.Count() == 0)
            {
                _context.Kbarticle.Add(new Kbarticle {
                    Name = "New Article", Content = ""
                });
                _context.SaveChanges();
            }
        }
示例#2
0
        public UserController(WapiDBContext context)
        {
            _context = context;

            if (_context.User.Count() == 0)
            {
                _context.User.Add(new User {
                    Fname = "Christophe", Pname = "Maille"
                });
                _context.SaveChanges();
            }
        }
示例#3
0
        public ProductController(WapiDBContext context)
        {
            _context = context;

            if (_context.Product.Count() == 0)
            {
                _context.Product.Add(new Product {
                    Name = "Switch", Category = "COMM", ProductType = "Network device"
                });
                _context.SaveChanges();
            }
        }
示例#4
0
        public CommentsController(WapiDBContext context)
        {
            _context = context;

            if (_context.Comment.Count() == 0)
            {
                _context.Comment.Add(new Comment {
                    Title = "New Comment", Content = ""
                });
                _context.Comment.Add(new Comment {
                    Title = "Another New Comment", Content = ""
                });
                _context.SaveChanges();
            }
        }
示例#5
0
 public GlobalsController(WapiDBContext context)
 {
     _context = context;
 }
示例#6
0
 public WhatsthatsController(WapiDBContext context)
 {
     _context = context;
 }
示例#7
0
 public TopicsController(WapiDBContext context)
 {
     _context = context;
 }
示例#8
0
 public ElearningsController(WapiDBContext context)
 {
     _context = context;
 }
示例#9
0
 public userdocsController(WapiDBContext context)
 {
     _context = context;
 }