PetaPoco

            var sql = @"SELECT TOP 1000 [Id]
      ,[UserName]
      ,[Name]
      ,[HeadimgUrl]
      ,[PasswordHash]
      ,[Email]
      ,[Enable]
      ,[LoginTimes]
      ,[LastLoginTime]
      ,[CreatedTime]
      ,[NickName]
      ,[UserType]
      ,[ParentUserId]
      ,[Money]
      ,[SecurityStamp]
      ,[PhoneNumber]
      ,[PhoneNumberConfirmed]
      ,[TwoFactorEnabled]
      ,[LockoutEndDateUtc]
      ,[LockoutEnabled]
      ,[AccessFailedCount]
  FROM [Candoo.Zero].[dbo].[sys_User]";
            PetaPoco.Database db = new PetaPoco.Database("mssql_default");
            var list = db.Fetch<dynamic>(sql);
            foreach (var item in list)
            {
                Response.Write(item.UserName);
            }

 

posted @ 2017-03-05 14:50  shiningrise  阅读(230)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css