Пример #1
0
 static void Main(string[] args)
 {
     using (PhoneBookContext context = new PhoneBookContext())
     {
         context.Persons.Add(new Model.Person() { FirstName = "Алена", LastName = "Буткевич", Patronymic = "Антоновна", Description = "Подруга" });
         context.SaveChanges();
     }
 }
Пример #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);
        }
Пример #3
0
 static void Main(string[] args)
 {
     pbCtx = new PhoneBookContext();
     //AddDBRecords();
     //ReadAllDBRecords();
     //CreateARecord();
     //ReadAllDBRecords();
     //CreateARecord();
     //UpdateARecord();
     //DeleteARecord();
     ReportinNameOrder();
 }
Пример #4
0
 public static void ReportinNameOrder()
 {
     PhoneBookContext pbx = new PhoneBookContext();
 }