c# - Access to the return value from the database by linq -


i need send value database code

var concerthallid = _concert in db.tbl_content_context     join _concerthall in db.tbl_concert_concerthall on _concert.contextid equals _concerthall.contextid     _concert.encontextid == concertid     select _concerthall.concerthallid; 

how set concerthallid variable?

your query return iqueryable, if return 1 row or need first 1 use after code:

var id = concerthallid.firstordefault(); 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -