Contents tagged with ASP.NET MVC
-
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.
-
Writing Unit Tests for ASP.NET Web API Controller
In this blog post, I will write unit tests for a ASP.NET Web API controller in the EFMVC reference application. Let me introduce the EFMVC app, If you haven't heard about EFMVC. EFMVC is a simple app, developed as a reference implementation for demonstrating ASP.NET MVC, EF Code First, ASP.NET Web API, Domain-Driven Design (DDD), Test-Driven Development (DDD). The current version is built with ASP.NET MVC 4, EF Code First 5, ASP.NET Web API, Autofac, AutoMapper, Nunit and Moq. All unit tests were written with Nunit and Moq. You can download the latest version of the reference app from http://efmvc.codeplex.com/
-
Building Windows Azure Cloud Services App with Web Role, Worker Role, Table Storage and Service Bus
Windows Azure Cloud Services, provides a Platform as a Service (PaaS) offering for building multi-tier, highly scalable, reliable cloud applications on the Windows Azure Cloud platform. In this blog post, I will demonstrate how to build a multi-tier Windows Azure Cloud Services application using with Web Role, Worker Role, Table Storage and Service Bus Queue. This demo application will also demonstrates the usages of Service Bus Queue, Table Storage and how to communicate between the Web Role and Worker Role.
-
Generating Entity Data Model Diagram from EF Code First DbContext
The Entity Framework Code First approach lets the developers to build applications with Domain-Driven Design (DDD) by hand coding your Persistence Ignorance (PI) classes. At the same time, it would be great if we could see the entity model in a visual diagram, which can also ensure that our domain model is accurate and our relationships are designed properly. The Entity Framework Power Tools lets you to view a read-only view of the Code First model in the Entity Model Designer, from a Code First DbContext class.
-
Writing Unit Tests for an ASP.NET MVC Action Method that handles Ajax Request and Normal Request
In this blog post, I will demonstrate how to write unit tests for an ASP.NET MVC action method, which handles both Ajax request and normal HTTP Request. I will write a unit test for specifying the behavior of an Ajax request and will write another unit test for specifying the behavior of a normal HTTP request. Both Ajax request and normal request will be handled by a single action method. So the ASP.NET MVC action method will be execute HTTP Request object’s IsAjaxRequest method for identifying whether it is an Ajax request or not. So we have to create mock object for Request object and also have to make as a Ajax request from the unit test for verifying the behavior of an Ajax request. I have used NUnit and Moq for writing unit tests.
-
Using TypeScript in ASP.NET MVC Projects
In the previous blog post Microsoft TypeScript : A Typed Superset of JavaScript, I have given a brief introduction on TypeScript. In this post, I will demonstrate how to use TypeScript with ASP.NET MVC projects and how we can compile TypeScript within the ASP.NET MVC projects.
-
Dependency Injection in ASP.NET Web API using Autofac
In this post, I will demonstrate how to use Dependency Injection in ASP.NET Web API using Autofac in an ASP.NET MVC 4 app. The new ASP.NET Web API is a great framework for building HTTP services. The Autofac IoC container provides the better integration with ASP.NET Web API for applying dependency injection. The NuGet package Autofac.WebApi provides the Dependency Injection support for ASP.NET Web API services.
-
Building a Windows Azure App using Azure Queue, Azure Table and ASP.NET MVC Web Role
In this post, I will demonstrate a Windows Azure app using Azure Queue, Azure Table and a ASP.NET MVC 4 Web Role application. This post is explaining few initial steps for building a demo Azure app where asynchronous commands (write operations that changes the data) put into Azure Queue and an Azure Work Role will persist the data into Azure Table from Queue messages for the read operations. The source code is available from http://azurehack.codeplex.com/ .The demo application will modify and add more functionality on later.
-
Commands, Command Handlers and Command Dispatcher
In this post, I am trying to add some CQRS principles onto my EFMVC project. EFMVC is a small web app for demonstrating ASP.NET MVC and EF Code First. Please keep in mind that this is not the implementation CQRS patterns, but trying to add some CQRS flavors on the Solution Architecture with Commands that changes the data (Create, Update and Delete). The current implementation of command execution is implemented in a synchronous way.
-
EFMVC 1.0 Preview Released
A while ago, I have released EFMVC, a demo web app built using ASP.NET MVC 3, EF Code First and Unity. The EFMVC app has demonstrated many architectural patterns and practices such as Generic Repository, Repository pattern, Unit of Work pattern, Dependency Injection pattern and Application Service later. Today I would like to announce the release of EFMVC 1.0 Preview. This release is an early preview release that has made some changes in the solution architecture. The preview is written in ASP.NET MVC 3 version and will be migrated to ASP.NET MVC 4 with new features on later.