Is there any way to find an entity with its unique id without knowing its type ?
For example write
DataContext.Find(Id);
instead of
DataContext.Set<T>().Find(Id);
Thanks
Id is unique only within the table. You can not give Id and ask, in which table is it used...You do not want to do it this way :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.