Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

My team at Marlabs, developed and released a sample reference web app for the Microsoft ASP.NET stack, named “SocialGoal” . SocialGoal is a social networking web app for socializing your goals and strategies with people. People can create goals and can be shared across the network of SocialGoal users. This app is built with ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, Twitter Bootstrap and following Test-Driven Development (TDD) and Domain Driven Design (DDD). The first drop of the application is available on github at https://github.com/MarlabsInc/SocialGoal. A release note is available in the docs folder of the project repository. The primary objective of the SocialGoal app is to provide a learning app for building real-world web apps with ASP.NET MVC 5 and EF 6 Code First.

The app is built with following technologies:

  • ASP.NET MVC 5
  • EF 6 Code First
  • AutoMapper
  • Autofac
  • Twitter Bootstrap
  • NUnit
  • Moq
Published Friday, January 24, 2014 3:15 AM by shiju

Comments

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Saturday, January 25, 2014 9:58 AM by raj

Thanks for providing a full-fledged web app.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Monday, January 27, 2014 1:50 AM by Magoffin

I've been exploring for a little for any high-quality articles or weblog posts

in this kind of space . Exploring in Yahoo I finally stumbled upon this site.

Reading this info So i'm glad to convey that I've a very excellent uncanny feeling I discovered exactly what I needed.

I so much surely will make certain to do not forget this web site and give it a glance regularly.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, January 28, 2014 1:36 AM by Razack

Thanks shiju. Very happy to see the app as open source.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, January 28, 2014 5:12 PM by Piotr Perak

Can you tell me what is the reason to create UoW in this project? Tests are very very brittle. And you pass strings as filters and then you switch case on them!?

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Wednesday, January 29, 2014 4:44 AM by shiju

@brittle - The primary objective of the app is to provide a learning app for building apps with ASP.NET MVC and EF Code First, which would be better than a normal CRUD demo.In this project, there is no explicit need for Unit of Work, but you can use this Unit of Work for managing  transactions, where you would be leveraging multiple repositories for performing a transaction from the service layer.  

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 6:12 AM by Darley

Superb stuff. Regards!

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 8:26 AM by Ben

For learning purpose, this is a brilliant application.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 8:28 AM by Alexis

Good learning to unit testing and mocking.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 8:31 AM by Deitz

You have made your point very effectively..

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 8:31 AM by aspcoder

We don't need blog posts with traditional hello world apps, but we need this kind of demo apps.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 1:25 PM by Chung

Nicely put, Appreciate it!

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 1:48 PM by Hopetoun

Valuable information. Lucky me I discovered your site accidentally, and I'm shocked why this

accident didn't happened in advance! I bookmarked it.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 3:17 PM by Akhtar

Thanks a lot, Quite a lot of info!

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, January 30, 2014 3:45 PM by Gandy

Thanks a lot, I enjoy it.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Saturday, February 1, 2014 10:28 PM by Ed

Great job! Did you use a t4 template for generating the repository and servic code? It seems redundant and a lot of typing to do manually. Thanks

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Sunday, February 2, 2014 12:05 AM by shiju

@Ed - Currently we did not used T4. Appreciate it if you could send a pull request in github.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Sunday, February 2, 2014 7:03 AM by Dunlap

Many thanks, Quite a lot of information!

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Sunday, February 2, 2014 1:34 PM by Ed

RE: T4 Templates for repo and service code. Note, I do not know how to write these templates. Though here is a link to a blog which uses older technologies than you, but does a similar job. I've used this in the past and having the templates generate the code was a huge time saver. In it he uses the t4 templates.

tdryan.blogspot.com/.../another-entity-framework-4-repository.html

If anyone knows how to write these templates it would be a much needed and incredible time saver for your solution.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Sunday, February 2, 2014 1:51 PM by Ed

For those in the community with experience writing T4 templates, this download can be a great starting point

tdryan.codeplex.com/.../62560

See this blog for example usage:

tdryan.blogspot.com/.../another-entity-framework-4-repository_15.html

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Sunday, February 2, 2014 3:33 PM by Lee

Where can I get information on how you setup your nuget as a project? I've not seen this before.

Thank you

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Monday, February 3, 2014 2:44 AM by Llewelyn

Very good write ups, Appreciate it!

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Monday, February 3, 2014 3:33 AM by shiju

@Lee - In the latest version, you don't have to do anything for NuGet. Just build your solution, it will automatically restore your NuGet packages.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Monday, February 3, 2014 10:05 AM by Bob

DTO layer is missing no ?

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Monday, February 3, 2014 7:31 PM by Anne

I can't run the site as I can't locate the db? Please help.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, February 4, 2014 4:24 AM by shiju

@Anne - Please provide the data source in the connecting string of web.config section. Just look on this  <add name="SocialGoalEntities" connectionString="Data Source=.;Initial Catalog=SocialGoal;Integrated Security=True" providerName="System.Data.SqlClient" />

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, February 4, 2014 4:27 AM by shiju

@Bob - Nothing is missing. Repository classes provide data persistence and Service Layer provides the application facade which can be used as business logic layer.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, February 4, 2014 9:08 AM by ryanbesko

Not sure if anyone else experienced this but running this app changed my IIS folder from C:\inetpub\wwwroot to the directory I ran the app from.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, February 4, 2014 3:05 PM by Ted

This is what I get:

HTTP Error 404.15 - Not Found

The request filtering module is configured to deny a request where the query string is too long.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, February 4, 2014 10:42 PM by Bart

Amazing how Socialgoal.core has 1 file.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Wednesday, February 5, 2014 6:35 AM by shiju

@Bart - Currently it is just one, but just want to put common things to this project in future.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Wednesday, February 5, 2014 4:40 PM by Ted

Yes - this installation set my default web site to itself.  I would appreciate it if the install was less intrusive.  I am having to rebuild my web sites on my PC.  Advice - don't install this reference app on a box you depend on.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Wednesday, February 5, 2014 5:50 PM by Beor

Amazing many of good knowledge!

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Wednesday, February 5, 2014 11:03 PM by shiju

@Ted - The NuGet packages has been removed from source control. When you build the solution at first time, it will automatically restore NuGet package. Regarding the default web site in IIS, you can change this behavior from web project's properties.  

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, February 6, 2014 12:13 AM by Orellana

hello there and thank you for your info – I have definitely picked up something new from right here.

I did however expertise a few technical issues using this web site, as I experienced to reload the website lots of times previous to I could get it to load properly.

I had been wondering if your hosting is OK? Not that I am complaining, but sluggish loading instances

times will often affect your placement in google and could

damage your quality score if advertising and marketing with Adwords.

Anyway I'm adding this RSS to my e-mail and can look out for much more of your respective intriguing content.

Make sure you update this again soon.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, February 6, 2014 3:43 PM by Eduardo Pires

Hello!

Some reason to use anemic domain model?

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, February 6, 2014 11:40 PM by shiju

@Eduardo Pires - This app is not designed to be anemic domain model. I have started this sample app for giving training to a fresher engineer team where the primary focus was ASP.NET MVC and EF Code First. In future, we might re-design the domain model with domain services.  

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Friday, February 7, 2014 2:43 AM by Ted

I will give that a try.  Thank you

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Friday, February 7, 2014 3:46 AM by shiju

@Ted - The latest drop is configured to be used IIS Express instead of IIS.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Friday, February 7, 2014 9:11 AM by Ameya

Is there a document that could possibly provide a brief overview of the code, how it was developed and designed?

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Monday, February 10, 2014 12:19 PM by Andrus

Great content, Thank you!

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Thursday, February 13, 2014 11:02 AM by Hargis

You've made your stand very effectively!.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, February 18, 2014 11:59 PM by Danner

Valuable data, Regards.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Monday, March 3, 2014 12:00 PM by My Helper

Why we have interfaces and concrete classes are in a same file? Is not it good to separate these? If so, do you know the best naming convention? (Both for service and Repositories).

Thank you,

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Monday, March 24, 2014 2:19 PM by waqas1980

It's really nice application, specially for learners like me. It will be very handy if you provide a documentation on it.

# re: Releasing SocialGoal - Reference Web App for ASP.NET MVC 5, EF 6 Code First, AutoMapper, Autofac, TDD and DDD

Tuesday, March 25, 2014 12:09 AM by dbtpictd

Nice post, nice webapp.

Could you show us a sample on how to unit test a repository method in your app (by mocking dbset)?

Thanks.

Leave a Comment

(required) 
(required) 
(optional)
(required)