示例#1
0
文件: Program.cs 项目: maximzyl/DB
        static void Main(string[] args)
        {
            BrandTable b = new BrandTable
            {
                Brandid = Guid.NewGuid(),
                Brandcountry = "Russia2",
                Brandfoundationyear = "1960",
                Brandname = "Autovaz"
            };

            //b.AddRecord();

            //b.Brandsite = "avtovaz.com";

            //b.UpdateRecord();

            var a = b.GetAllRecord();

            //b.DeleteRecord();

            Console.Write("Done...");
            Console.ReadKey();
        }
示例#2
0
文件: BrandTable.cs 项目: maximzyl/DB
 private new List<BaseTable> ToSchema(SqlDataReader reader)
 {
     List<BaseTable> result = new List<BaseTable>();
     while (reader.Read())
     {
         var table = new BrandTable
         {
             Brandid = new Guid(reader.GetValue(0).ToString()),
             Brandname = reader.GetValue(1).ToString(),
             Brandfoundationyear = reader.GetValue(2).ToString(),
             Brandsite = reader.GetValue(3).ToString(),
             Brandcountry = reader.GetValue(4).ToString()
         };
         table.UpdateFieldList.Clear();
         result.Add(table);
     }
     return result;
 }