doing the check is no different than how to do it with EF .. this means commenting on the above answer.
If you are familiar with DataAnnotations, you know how to do validation. Assuming you have viewmodels, add annotations to them. In your controllers, you work with viewmodels, where validation is performed. When checking, you pass them to your data layer, which can be massive or ef or something else.
to be clear, you are not testing entities that you are testing in view models. Hope this makes sense! I almost do not understand this hahahahaha myself.
source share