Exemplo n.º 1
0
 static void Main(string[] args)
 {
     using (PhoneBookContext context = new PhoneBookContext())
     {
         context.Persons.Add(new Model.Person() { FirstName = "Алена", LastName = "Буткевич", Patronymic = "Антоновна", Description = "Подруга" });
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
        void Application_Start(object sender, EventArgs e)
        {
            // Код, выполняемый при запуске приложения

            var context = new PhoneBookContext();

            context.Database.Initialize(false);

            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     pbCtx = new PhoneBookContext();
     //AddDBRecords();
     //ReadAllDBRecords();
     //CreateARecord();
     //ReadAllDBRecords();
     //CreateARecord();
     //UpdateARecord();
     //DeleteARecord();
     ReportinNameOrder();
 }
Exemplo n.º 4
0
 public static void ReportinNameOrder()
 {
     PhoneBookContext pbx = new PhoneBookContext();
 }