Beispiel #1
0
        public DeviceController(MyLabContext context)
        {
            _context = context;

            if (_context.Devices.Count() == 0)
            {
                _context.Devices.Add(new Device {
                    Title = "Item1"
                });
                _context.SaveChanges();
            }
        }
 /// <summary>
 /// Initializes _context
 /// </summary>
 /// <param name="context"></param>
 public CategoriesController(MyLabContext context)
 {
     _context = context;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes the _context
 /// </summary>
 /// <param name="context"></param>
 public ItemsController(MyLabContext context)
 {
     _context = context;
 }