示例#1
0
        static void Main(string[] args)
        {
            IBaseDal baseDal = DALFactory.CreateInstance();
            Company  company = baseDal.Find <Company>(1);
            Company  c       = new Company()
            {
                Id = 1, Name = "haha"
            };
            bool     b        = c.Validate();
            UserInfo userInfo = new UserInfo()
            {
                Account = "4324", CompanyId = 1, CompanyName = "丰田啊到", CreateTime = DateTime.Now, CreatorId = 1, Email = "3252", LastLoginTime = DateTime.Now, LastModifierID = 1, LastModifyTime = DateTime.Now, Name = "ewang", Password = "******", Status = 0
            };

            baseDal.InsertData <UserInfo>(userInfo);
            UserInfo u = baseDal.Find <UserInfo>(1);

            Console.WriteLine(company.Name + "的" + u.Name);
            Console.WriteLine("Hello World!");
        }
示例#2
0
 public async Task <T> Find(int id)
 {
     return(await Task.Run <T>(() => ibaseDal.Find(id)));
 }
示例#3
0
 public IQueryable <T> Find(Expression <Func <T, bool> > where)
 {
     return(dal.Find(where));
 }