ASP.NET MVC 4 is the fourth major version of the ASP.NET Model-View-Controller platform for web applications.

learn more… | top users | synonyms

2
votes
2answers
245 views

Domain Model vs View Model

I'm in the early stages of my programming career and I've been working with MVC for just about a year now. I've spent much time learning about the pattern and the concepts behind it, but as the ...
0
votes
1answer
146 views

N-Tier MVC4 Web Application with console application

I've built an MVC web application and I need to run several tasks at different time intervals. So I've also made a console application to schedule these tasks through task manager in windows. For ...
0
votes
1answer
900 views

What exactly is bootstrap admin-template and how it is supposed to be used

So this is my second ASP.NET MVC 4 project. It's decided that for this one we will use this template and it was said in a way that I felt really stupid for not knowing how exactly this template will ...
0
votes
2answers
643 views

How to handle lookup data in a C# ASP.Net MVC4 application?

I am writing an MVC4 application to track documents we have on file for our clients. I'm using code first, and have created models for my objects (Company, Document, etc...). I am now faced with the ...
1
vote
3answers
176 views

How to prevent fat views in MVC?

I'm just curious. If I'm a lead dev in a company of a dozens of developers is there any way I can prevent a newbie developer from creating a fat view? By fat view I mean to have an empty controller, ...
1
vote
7answers
993 views

Hiding query strings logically?

I feel uncomfortable when using query string parameters as: http://xyz.com/default.aspx?carId=1129&country=uk&uniqueId=98745DVF4563VVf1259 I would rather use something that should not make ...
3
votes
3answers
776 views

Utility Classes in MVC - ASP.NET

So I was wondering today, where would you put utility classes in an ASP.NET MVC app? By utility classes I mean classes that can be static and are just used to perform a function. Like a class to send ...
0
votes
1answer
261 views

bad practice to have actions in web api controllers

I was creating a new action for a WebApi controller and tried to create a url using the following: @Url.RouteUrl("DefaultApi", new { httproute = "", controller = "ClientApi"}) and noticed that the ...
3
votes
1answer
171 views

Are areas a good organizational feature, or just extra work?

Do Areas in ASP.NET MVC end up being a help or just a drag in the end (because of the URL construction)? Would it be better to have subdirectories inside the main Controllers folder? or are there any ...
2
votes
1answer
112 views

when is it necessary or when should a controller be async

When is it absolutely necessary for a controller to be async? Should all controllers be async or is it bad practice to make all of them async unless it is necessary. Just looking for some general ...
1
vote
1answer
367 views

necessary to migrate to Web API from MVC controller

Since the released of Web API, I've been wondering whether it's necessary or helpful to migrate/change MVC controllers to use Web API calls. Since it's hard to describe code I'll show an example of ...
3
votes
0answers
185 views

Junior software developer - How to understand web applications in depth? [duplicate]

I am currently a junior developer in web applications and specifically in ASP.NET MVC technology. My problem is that the C# senior developer in the company has no experience with this technology and I ...
0
votes
2answers
193 views

In OnionArchitecture can UI talks directly to datastore or not?

I'm fan of onion architecture but looking for some relaxing solutions in some areas. First of all I was thinking about communicating directly from UI (from controller in mvc) to data on the read ...
0
votes
0answers
99 views

Create a model for scenario having textbox depending on checkboxes

I have a scenario, <input id="Order" type="checkbox" name="Order">Order <input id="MobileChk0" type="checkbox" name="Mobile"> <input id="Mobile0" type="text">Mobile ...
4
votes
1answer
279 views

Controlling cookies with many tabs

I have a peculiar problem. My application has different levels of authentication. One specific level of user (super user) needs to be able to use the application as another user (subordinate user) ...
1
vote
1answer
641 views

Design pattern for maintaining different state(s) across browser tabs in a single session

I have an MVC 4 based web app. Where I provide 2 login types, 1. Employee and 2. Customer. With Customer login, I present a dashboard and other stuff, about his orders, etc. With Employee login, I ...
6
votes
1answer
952 views

Is Code First with Migrations or SQL Server Data Tools a better fit?

I have been given a spec to create a new MVC4 website, it will not be too large a project at first but I suspect it will grow as the business gets new ideas for it. Using .NET 4.5 ASP.NET MVC4 and EF ...
1
vote
1answer
432 views

Why should I use Iesi.Collections instead of the traditional System.Collection?

Was research on how (for convetion) define a Many Many where table where both fields are primary key and found this post. So decide to install the Iesi.Collections in my library domain. But there ...
1
vote
2answers
204 views

Multiple orders in a single list

I have a problem with a ranking system I am using. Scenario: An online game with around 10k players calculates a real time ranking of points when a certain event occurs. Events don't occur that ...
0
votes
1answer
623 views

Issue deploying Asp.Net MVC 4 website to Azure [closed]

How do you deploy your website in Azure so that it looks exactly like when you run it in your localhost? This is a very simple website that I created following the ASP.NET MVC4 tutorials. However, I ...
5
votes
3answers
1k views

Versioning an API

I'm starting a side project, the first stage will be a building a web application with MVC, in later stages we will be adding clients for mobile platforms. My thought was to create one API that all of ...
2
votes
2answers
616 views

MVC : Does Code to save data in cache or session belongs in controller?

I'm a bit confused if saving the information to session code below, belongs in the controller action as shown below or should it be part of my Model? I would add that I have other controller methods ...
1
vote
3answers
314 views

MVC4 Service > Controller Models

I'm working on a MVC4 N-tier application and have a quick question about Service to Controller relation and using Domain/ViewModel. public ActionResult Details(int id = 0) { ...
1
vote
1answer
459 views

Incorporating web designer's HTML pages into an MVC4 application

We are embarking on a new project which will be using the ASP .NET MVC4 platform. I have been informed that the design is being outsourced to a custom design firm and they will be supplying us with ...
1
vote
0answers
221 views

Reusing values for segment variables when generating outbound URLs

When routes are matched to the outbound URLs, the routing system will try to find values for each of the segment variables in route's URL pattern by also looking at the values from the current ...
1
vote
2answers
2k views

ASP.NET MVC 4 with Entity Framework 5 and SimpleMembership integrated into Repository and Unit Of Work pattern

I have a ASP.NET MVC4 project in which I would like to use the SimpleMembership. The application has a Person table that holds relevant information about users in the system. I would like a link ...
0
votes
1answer
416 views

Implementing a Service Layer with MVC4 while honoring Single Responsibility

I'm trying to learn some best practices while I ramp up on MVC4. I have a solution with three projects: Web: MVC stuff Core: Data Model Tests: Testing classes I'm now trying to add: Services: ...
-3
votes
2answers
265 views

What approaches should be considered for user experience in asp.net mvc 4? [closed]

I'm a new ASP.NET MVC programmer. I've done asp.net webforms extensively and I used the Ajax Control Toolkit and update panels to provide a smoother user experience. What paradigms should I be ...
1
vote
1answer
623 views

project layout using webapi

I have the following project structure I would like to implement. I would like to know if there are any pitfalls to structuring my code this way. It is going to be using Microsoft's WebAPI, an MVC 4 ...
11
votes
4answers
18k views

What exactly is “Web API” in ASP.Net MVC4?

I know what a Web API is. I've written API's in multiple languages (including in MVC3). I'm also well practiced in ASP.Net. I just discovered that MVC4 has "Web API" and without going through the ...
11
votes
3answers
7k views

WCF Data Services (OData) Vs ASP.NET Web API? Hypermedia?

I'm desiging a distributed application that will consist of REST services and a variety of clients (Silverlight, iOS, Windows Phone 7, etc). I was ready to decide that I would implement my REST ...