Esempio n. 1
0
        public static void Initialize(ServidorContext context)
        {
            context.Database.EnsureCreated();
            // ver algun servidor
            if (context.Servidor.Any())
            {
                return; // DB ha sido iniciada
            }

            var servidores = new Servidor[]
            {
            };

            foreach (Servidor s in servidores)
            {
                context.Servidor.Add(s);
            }
            context.SaveChanges();
        }
Esempio n. 2
0
 public ServidorController(ServidorContext context)
 {
     _context = context;
 }
 public ServidorManager(ServidorContext servidorContext)
 {
     _servidorContext = servidorContext;
 }