I have added a property to a partial class of a model. This property will retrieve a model from database according to property value.
Example:
class movie
{
int language;
}
partial movie
{
public Language SpokenLanguage
{
get
{
var currLang = db.Languages.Where(ml => ml.ID == this.language).FirstOrDefault();
return currLang;
}
}
}
Is this approach will affect application performance when I retrieve a list of movies?
If so what is the equivalent and better performance?