Beispiel #1
0
        public static void Add(ORM orm)
        {
            Console.Write("\nFirstName: ");
            string fn = Console.ReadLine();

            Console.Write("LastName: ");
            string ln = Console.ReadLine();

            Console.Write("Age: ");
            int age = Convert.ToInt32(Console.ReadLine());

            Console.Write("PhoneNumber: ");
            string pn = Console.ReadLine();

            Console.Write("Email: ");
            string em = Console.ReadLine();

            orm.Add(new People
            {
                FirstName   = fn,
                LastName    = ln,
                Age         = age,
                PhoneNumber = pn,
                Email       = em
            });
        }
Beispiel #2
0
        public static void Add(ORM orm)
        {
            Console.Write("\nCountry: ");
            string country = Console.ReadLine();

            Console.Write("City: ");
            string city = Console.ReadLine();

            Console.Write("Oblast: ");
            string oblast = Console.ReadLine();

            Console.Write("Region: ");
            string region = Console.ReadLine();

            Console.Write("Street: ");
            string street = Console.ReadLine();

            Console.WriteLine("House: ");
            int house = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Flat: ");
            int flat = Convert.ToInt32(Console.ReadLine());

            orm.Add(new Addresses
            {
                Country = country,
                City    = city,
                Oblast  = oblast,
                Region  = region,
                Street  = street,
                House   = house,
                Flat    = flat
            });
        }
Beispiel #3
0
        public static void Add(ORM orm)
        {
            Console.Write("\nName: ");
            string name = Console.ReadLine();

            orm.Add(new Types
            {
                Name = name
            });
        }
Beispiel #4
0
        public static void Add(ORM orm)
        {
            Console.Write("\nStatus: ");
            string status = Console.ReadLine();

            orm.Add(new DeliveryStatus
            {
                Status = status
            });
        }
Beispiel #5
0
        public static void Add(ORM orm)
        {
            Console.Write("\nBrand: ");
            string br = Console.ReadLine();

            Console.Write("Number: ");
            string n = Console.ReadLine();

            Console.Write("Year: ");
            DateTime year = Convert.ToDateTime(Console.ReadLine());


            orm.Add(new Cars
            {
                Brand  = br,
                Number = n,
                Year   = year
            });
        }
Beispiel #6
0
 //添加用户
 public static void Add(Model.User user)
 {
     ORM.Add(user, new Model.UserMapping(), Constant.CONNSTRING);
 }