Class CountryManager
Represents the manager of countries
Inheritance
System.Object
CountryManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Framework.Base.Core
Assembly: Simplic.Framework.Base.dll
Syntax
public class CountryManager
Methods
| Improve this Doc View SourceDeleteCountry(Country)
Remove a Country
Declaration
public void DeleteCountry(Country obj)
Parameters
Type | Name | Description |
---|---|---|
Country | obj | Object to delete |
DeleteCountryWithId(Guid)
Remove a Country
Declaration
public void DeleteCountryWithId(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Id value |
GetAllCountries()
Get all Countries
Declaration
public IEnumerable<Country> GetAllCountries()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Country> | IEnumerable of Country |
GetCountry(Guid)
Get a single Country
Declaration
public Country GetCountry(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Id value |
Returns
Type | Description |
---|---|
Country | Country instance, else null |
GetCountryByIso(String)
Get a single Country
Declaration
public Country GetCountryByIso(string iso)
Parameters
Type | Name | Description |
---|---|---|
System.String | iso | Iso Code |
Returns
Type | Description |
---|---|
Country | Country instance, else null |
GetCountryNameByIso(String, Int32)
Get country name by iso
Declaration
public string GetCountryNameByIso(string iso, int languageId = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | iso | Country iso code |
System.Int32 | languageId | Langauge id (E.g. 0 = German, ...) |
Returns
Type | Description |
---|---|
System.String | Country name if found, else null/empty string |
SaveCountry(Country)
Save a Country
Declaration
public void SaveCountry(Country obj)
Parameters
Type | Name | Description |
---|---|---|
Country | obj | Object to save |