This question is locked. New answers and comments are not allowed.
Hi All
I currently have a db table called country which contains the following fields:
* CountryCode
* ISOCode
* Region
* CurrencyCode
* Unit
I haven then created a view on top of this table and created a model using database first approach using the view. Instead of creating a single entity called Country I want the model to create the following two entities:
I tried manually creating two entities which map to the same table but got an error that two entities can not map to the same view. Can someone point me in the right direction on how to do this in OpenAccess?
I currently have a db table called country which contains the following fields:
* CountryCode
* ISOCode
* Region
* CurrencyCode
* Unit
I haven then created a view on top of this table and created a model using database first approach using the view. Instead of creating a single entity called Country I want the model to create the following two entities:
public partial class Country
{
private string _countryCode;
public virtual string CountryCode
{
get { return this._countryCode;}
set {this._countryCode = value;}
}
private string _iSOCode;
public virtual string ISOCode
{
get {return this._iSOCode;}
set { this._iSOCode = value;}
}
private string _region;
public virtual string Region
{
get{return this._region; }
set{this._region = value;}
}
}
public partial class Ccy
{
private string _unit;
public virtual string Unit
{
get{return this._unit;}
set{this._unit = value;}
}
private string _currencyCode;
public virtual string CurrencyCode
{
get{return this._currencyCode;}
set{this._currencyCode = value;}
}
}
I tried manually creating two entities which map to the same table but got an error that two entities can not map to the same view. Can someone point me in the right direction on how to do this in OpenAccess?