示例#1
0
        public ApiResult <IEnumerable <Member> > GetMembers()
        {
            var data   = MysqlDb.Set <Member>().AsQueryable();
            var result = data.Select(p => new Member
            {
                UserName = p.UserName == "5" ? p.UserName : "******"
            });

            int[] test  = new int[] { 1, 3, 5, 6, 7, 8, 0 };
            var   tdata = test.Select(u => (u == 3) ? u : 0);


            return(Success(data.Take(3).AsEnumerable()));
        }
示例#2
0
 public RespositoryBase(IMysqlDbContext skyMallDbContext)
 {
     _SkyMallDBContext = skyMallDbContext;
     _DbSet            = _SkyMallDBContext.Set <TEntity>();
 }