public static void Update <TEntity>(this IBcDbContext dbContext, TEntity entity, params string[] pnames) where TEntity : class { dbContext.Set <TEntity>().Attach(entity); var stateEntry = ((IObjectContextAdapter)dbContext).ObjectContext. ObjectStateManager.GetObjectStateEntry(entity); foreach (var pname in pnames) { stateEntry.SetModifiedProperty(pname); } }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._baseService = BrEngineContext.Current.Resolve <IBrandService>(); }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._parameterSetService = BrEngineContext.Current.Resolve <IParameterSetService>(); }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._acUserService = BrEngineContext.Current.Resolve <IAC_UserService>(); }
public static void Update <TEntity>(this IBcDbContext dbContext, TEntity entity, params Expression <Func <TEntity, object> >[] exprs) where TEntity : class { dbContext.Update(entity, exprs.Select(entity.GetPropertyName).ToArray()); }
public static void Delete <TEntity>(this IBcDbContext dbContext, TEntity entity) where TEntity : class { dbContext.Set <TEntity>().Attach(entity); dbContext.Set <TEntity>().Remove(entity); }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._userAddressService = BrEngineContext.Current.Resolve <IUserAddressService>(); }
public void Init() { BrEngineContext.Init(null); this._dbContext = BrEngineContext.Current.Resolve <IBcDbContext>(); this._yH_UserBankAccountService = BrEngineContext.Current.Resolve <IYH_UserBankAccountService>(); }