I have some linq entities that inherit something like this:
public abstract class EntityBase { public int Identifier { get; } } public interface IDeviceEnti
Wow, looks like for once I may be able to one-up @MarcGravell!
I had the same problem, then I discovered this answer, which solved the problem for me!
In your case, you would say:
return unitOfWork.GetRepository().Select(x => x).FindOne(x => x.DeviceId == evt.DeviceId);
and Bob's your uncle!