Entity Framework Validation

前端 未结 6 1543
情话喂你
情话喂你 2020-12-14 09:58

I\'m getting ready to start a new project and I\'ve been researching the entity framework. My question is what is the best strategy for validating the entities? Other projec

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 10:39

    If you use ASP.NET MVC, then you could use Validation Application Block or the System.ComponentModel.DataAnnotations. The articles Using Data Annotations and Using Application Block show how to do them using Linq, but the usage with entity-framework should be similiar.

提交回复
热议问题