TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shyam j
NA
26
419
about entity framework auto-generated model class object
Aug 23 2018 12:07 PM
hi,
i have a user table and language table, in user table have two fields 1)first language 2) second language foreignkeys from the language table.
now when I generated model using framework it generating virtual objects language and language1 but I need firstlanguage and second language
bellow code is model generated code
public
class
user
{
public
int
Id {
get
;
set
; }
public
int
Firstlanguage {
get
;
set
; }
public
int
SecondLanguage {
get
;
set
; }
public
virtual
Language Language {
get
;
set
; }
public
virtual
Language Language1 {
get
;
set
; }
}
public
class
Language
{
public
int
Id {
get
;
set
; }
public
string
Name {
get
;
set
; }
}
Usage of user class
var data=db.user.include(p=>p.Language).include(p=>p.Language1);
//here i can't able to recognize what is language and language1
Here i need to get query like this
var data=db.user.include(p=>p.FirstLanguage).include(p=>p.SecondLanguage);
sa
Reply
Answers (
2
)
ASP.NET MVC 5 with Identity and oracle.
how to use the if-else condition in storedprocedure