Code-First or Database-First, how to choose?

后端 未结 11 1280
盖世英雄少女心
盖世英雄少女心 2020-12-23 16:34

Let us suppose we are going to start new project - application that contains some business logic, user interface on ASP.NET, WPF or both of them. We\'d like to use ORM or DA

11条回答
  •  情书的邮戳
    2020-12-23 17:16

    To answer your edited question (manual db/auto classes or manual classes/db), I'd choose "neither". Autogenerated code of both kinds are to be avoided for a number of reasons, first of all YAGNI. You end up with code you never wrote but are nonetheless responsible for, code you'll never use, and (in my experience) code you'll end up spending more time refactoring than if you'd designed and written it yourself in the first place. And they both keep your focus far away from the most important location - the User.

提交回复
热议问题