public BaseService() { if (dbContexts == null) { dbContexts = new QGDDbContexts(); } }
public void originalSQl() { using (var context = new QGDDbContexts()) { var query = context.goods_Color_Img_Entity.FromSql("select top(10) * from dbo.tb_Goods_Color_Img").ToList(); Console.Write(JsonHelper.ToJson(query)); } }
public void EntityFun() { using (var context = new QGDDbContexts()) { var query = new Goods_Color_Img_Repository(context); var data = query.EntitiesAsNoTracking().Where(p => p.IsDefault == false).Skip(10).Take(10).ToList(); string sss = ""; } }
public void TestMethod1() { using (var context = new QGDDbContexts()) { var query = context.goods_Color_Img_Entity.AsNoTracking().Where(p => p.IsDefault == false); var ss = query.ToList(); Console.Write("ddddd545252"); context.SaveChanges(); } }
public Goods_Color_Img_Repository(QGDDbContexts dbContexts) : base(dbContexts) { }