public TerritoryCollection FetchAll() { TerritoryCollection coll = new TerritoryCollection(); Query qry = new Query(Territory.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
/// <summary> /// Creates a locale instance for the specified culture. /// </summary> /// <param name="culture">The culture.</param> /// <param name="languages">An enumeration of languages.</param> /// <param name="scripts">An enumeration of scripts.</param> /// <param name="territories">An enumeration of territories.</param> public Locale(CultureId culture, IEnumerable<Language> languages, IEnumerable<Script> scripts, IEnumerable<Territory> territories) { this.languages = new LanguageCollection(culture, languages); this.scripts = new ScriptCollection(culture, scripts); this.territories = new TerritoryCollection(culture, territories); this.Culture = culture; }
/// <summary> /// Creates a locale instance for the specified culture. /// </summary> /// <param name="culture">The culture.</param> public Locale(CultureId culture) { this.languages = new LanguageCollection(culture); this.scripts = new ScriptCollection(culture); this.territories = new TerritoryCollection(culture); this.Culture = culture; }
public TerritoryCollection FetchByQuery(Query qry) { TerritoryCollection coll = new TerritoryCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public TerritoryCollection FetchByID(object TerritoryID) { TerritoryCollection coll = new TerritoryCollection().Where("TerritoryID", TerritoryID).Load(); return coll; }
static partial void OnAfterEntityCollectionToDtoCollection(EntityCollection <TerritoryEntity> entities, TerritoryCollection dtos);
public static void RefreshForeignKeyTest(string connectionName) { OrderItemCollection oiColl = new OrderItemCollection(); oiColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { oiColl.es.Connection.Name = connectionName; } oiColl.Query.Where(oiColl.Query.OrderID > 11 | oiColl.Query.ProductID > 9); oiColl.Query.Load(); oiColl.MarkAllAsDeleted(); oiColl.Save(); OrderCollection oColl = new OrderCollection(); oColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { oColl.es.Connection.Name = connectionName; } oColl.Query.Where(oColl.Query.OrderID > 11); oColl.Query.Load(); oColl.MarkAllAsDeleted(); oColl.Save(); EmployeeTerritoryCollection etColl = new EmployeeTerritoryCollection(); etColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { etColl.es.Connection.Name = connectionName; } etColl.Query.Where(etColl.Query.EmpID > 4 | etColl.Query.TerrID > 4); etColl.Query.Load(); etColl.MarkAllAsDeleted(); etColl.Save(); CustomerCollection cColl = new CustomerCollection(); cColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { cColl.es.Connection.Name = connectionName; } cColl.Query.Where(cColl.Query.CustomerID > "99999" & cColl.Query.CustomerSub > "001"); cColl.Query.Load(); cColl.MarkAllAsDeleted(); cColl.Save(); TerritoryExCollection tExColl = new TerritoryExCollection(); tExColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { tExColl.es.Connection.Name = connectionName; } tExColl.Query.Where(tExColl.Query.TerritoryID > 1); tExColl.Query.Load(); tExColl.MarkAllAsDeleted(); tExColl.Save(); TerritoryCollection tColl = new TerritoryCollection(); tColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { tColl.es.Connection.Name = connectionName; } tColl.Query.Where(tColl.Query.TerritoryID > 5); tColl.Query.Load(); tColl.MarkAllAsDeleted(); tColl.Save(); ReferredEmployeeCollection reColl = new ReferredEmployeeCollection(); reColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { reColl.es.Connection.Name = connectionName; } reColl.Query.Where(reColl.Query.EmployeeID > 4 | reColl.Query.ReferredID > 5); reColl.Query.Load(); reColl.MarkAllAsDeleted(); reColl.Save(); ProductCollection pColl = new ProductCollection(); pColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { pColl.es.Connection.Name = connectionName; } pColl.Query.Where(pColl.Query.ProductID > 10); pColl.Query.Load(); pColl.MarkAllAsDeleted(); pColl.Save(); GroupCollection gColl = new GroupCollection(); gColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { gColl.es.Connection.Name = connectionName; } gColl.Query.Where(gColl.Query.Id > "15001"); gColl.Query.Load(); gColl.MarkAllAsDeleted(); gColl.Save(); EmployeeCollection eColl = new EmployeeCollection(); eColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { eColl.es.Connection.Name = connectionName; } eColl.Query.Where(eColl.Query.EmployeeID > 5); eColl.Query.Load(); eColl.MarkAllAsDeleted(); eColl.Save(); CustomerGroupCollection cgColl = new CustomerGroupCollection(); cgColl.es.Connection.Name = "ForeignKeyTest"; if (connectionName.Length != 0) { cgColl.es.Connection.Name = connectionName; } cgColl.Query.Where(cgColl.Query.GroupID > "99999" | cgColl.Query.GroupID < "00001"); cgColl.Query.Load(); cgColl.MarkAllAsDeleted(); cgColl.Save(); }