public bool UpdateWithWhere(object values, object where, Needletail.DataAccess.Engines.FilterType filterType) { var result1 = _MSSQLContext.UpdateWithWhere(values, where, filterType); var result2 = _SqlCEContext.UpdateWithWhere(values, where, filterType); return(result1 || result2); }
public IEnumerable <E> GetMany(object where, object orderBy, Needletail.DataAccess.Engines.FilterType filterType, int page, int pageSize) { var result1 = _MSSQLContext.GetMany(where, orderBy, filterType, page, pageSize); var result2 = _SqlCEContext.GetMany(where, orderBy, filterType, page, pageSize); return(result2.Union(result1)); }
public bool Delete(object where, Needletail.DataAccess.Engines.FilterType filterType) { //delete in both context var result1 = _MSSQLContext.Delete(where, filterType); var result2 = _SqlCEContext.Delete(where, filterType); return(result1 || result2); }
public E GetSingle(object where, Needletail.DataAccess.Engines.FilterType filterType = Needletail.DataAccess.Engines.FilterType.AND) { var result1 = _SqlCEContext.GetSingle(where, filterType); if (result1 == null) { //search in the MSSQL result1 = _MSSQLContext.GetSingle(where, filterType); //add it to the sqlCE if (result1 != null) { _SqlCEContext.Insert(result1); } } return(result1); }
public bool Delete(object where, Needletail.DataAccess.Engines.FilterType filterType) { return(this.dataSource.Delete(where : where, filterType: filterType)); }
public bool UpdateWithWhere(object values, object where, Needletail.DataAccess.Engines.FilterType filterType) { return(this.dataSource.UpdateWithWhere(values: values, where : where, filterType: filterType)); }
public Crmuser GetSingle(object where, Needletail.DataAccess.Engines.FilterType filterType) { return(this.dataSource.GetSingle(where : where, filterType: filterType)); }
public IEnumerable <Crmuser> GetMany(object where, object orderBy, Needletail.DataAccess.Engines.FilterType filterType, int page, int pageSize) { return(this.dataSource.GetMany(where : where, orderBy: orderBy, filterType: filterType, page: page, pageSize: pageSize)); }
public IEnumerable <Crmuser> GetMany(object where, Needletail.DataAccess.Engines.FilterType filterType, object orderBy, int?topN) { return(this.dataSource.GetMany(where : where, filterType: filterType, orderBy: orderBy, topN: topN)); }
private bool MoveDataBetweenServers(DBTableDataSourceBase <E, K> source, DBTableDataSourceBase <E, K> target, object where, Needletail.DataAccess.Engines.FilterType filterType) { //get the data to move var toMove = source.GetMany(where, filterType, null, null); foreach (var e in toMove) { //insert the data target.Insert(e); } //delete the data return(source.Delete(where, filterType)); }
public bool MoveDataFromMSSQLToSQLCE(object where, Needletail.DataAccess.Engines.FilterType filterType) { return(MoveDataBetweenServers(_MSSQLContext, _SqlCEContext, where, filterType)); }