Sharp Architecture alternative
I am looking Sharp Architecture alternative which use Entity Framework code first as ORM. Is there any mature project like Sharp Architecture with EF c开发者_运维百科ode first ?
Architecture is a blueprint. Once you see Sharp Architecture you should be able to simply think about it and change it to work with EF. If you are not able to do that you probably don't have enough skills with required APIs - that is th first thing you have to change before start dealing with architecture. No architecture will save you from understanding APIs and without understanding them you cannot do a good architecture correctly using features of your APIs.
Architecture should be driven by needs of your application. The approach where you want to bend needs of your application to fulfill some architecture blueprint is terrible wrong. First you have to define what should your architecture solve for you and after that you can ask if there is any blueprint already doing it (and nothing more).
Most of articles and sample architectures are just pushing a lot of patterns without actual need for them. Number of patterns and layers don't make a good architecture. In most cases it just makes the system overachitected and hard to maintain. These samples are mostly for explaining how to implement some patterns.
Bad news there is no exact replacement, Good news its easy to create something your own like I did.
I have been using S#arp for a long time and it is a good Architecture, I developed lots of applications with it but it looks like there is no more movement with that open source project so late last year I decided to move on an recreate something similar using the same principles but with Entity Framework.
Key components such as NHibernate, NHibernate.Validator and Castle Windsor was replaced to use Entity Framework, LINQ to Entites, System.ComponentModel.DataAnnotations and Autofac respectively. The layers remained the same like the Domain, Presentation, Task, Framework and Infrastructure.
On how I created it please have a look at this post on its detailed explanation. http://www.macaalay.com/2015/10/20/creating-a-solid-architectural-foundation-from-scratch-is-not-really-that-hard/
I also created a code generator which I called Effinator, which generated CRUD operations and basic UI from your database design
精彩评论