Answer the question
In order to leave comments, you need to log in
How to determine record id in asp.net by text field db.Mods.Find(id) doesn't work?
It is necessary to find the record id by some method to EF, by another text field, how to do this?
Answer the question
In order to leave comments, you need to log in
If I understand correctly, you want to get a specific entry or its IDs?
If the field is not unique, then you need to take into account that there can be several such records
If the field is unique
Or if this field is a foreign key, then you can
var itemId = db.Mods.Single(m=>m.SomeField==model.SomeField).Select(m=>m.Id);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question