The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern.

learn more… | top users | synonyms

-2
votes
0answers
27 views

Ideas for Administrator control and view

I´m developing web Application with administrator. Admin can show simple things like count of clients per day, clients (general), count of categories, subcategories ad products. My models Category: ...
1
vote
2answers
587 views

block access to area/controller's methods but allow inherited controller to run methods, asp .net mvc5

I am trying to find out how to block a whole area/controller from being accessed by typing url website.com/area1/basecontroller/method1 (this area also contains the views that will be displayed) , ...
0
votes
1answer
29 views

Using “Id” as Primary Key in green field Dapper Contrib MVC 5 site

I am creating a new site and will base it on ASP.NET MVC 5 & Dapper Contrib. I want to go all in with all these technologies - and get all the time saving / convention over configuration / terse ...
0
votes
0answers
21 views

Modern way to have equivalent of .net tableadapter in-memory table sync'd to db

I'm rewriting a 2005 era asp.net app that uses tableadapters, and relies on the in-memory datatables to have fast and frequent redisplay access to a table that is written to by several users, sort of ...
2
votes
2answers
104 views

Where does apply authorization rules for my layered application?

This question is about applying rules of my application that confuse me. My controller is using service and the service is using repository. public class CommentController: ApiController{ ...
0
votes
1answer
75 views

Need help with figuring out a better method of my application layout, please

I am working as the sole .Net developer at a company and I have been tasked with a very large and complex project, an internal intranet site for inventory and time tracking. I have built a project ...
-2
votes
0answers
30 views

I can not access $scope value from my controller within index.cshtml [on hold]

I am trying to create AngularJS, MVC ASP.Net single page application and I have stuck. I have created new folder within my project which contains app.js var myApp = angular.module('app', []); and ...
0
votes
0answers
21 views

Multiple web apis under one domain

I am using ASP.NET MVC and I have a project where I need to build different integration rest APIs for different partners http://domain.com/api/integration/partner1 ...
0
votes
0answers
18 views

Using @Hidden or passing through BeginForm?

I have a small question about the following answer from a stackoverflow question. There seem to be 2 ways to pass parameters through a @BeginForm() to a Controller. Using a Hidden field: ...
2
votes
2answers
38 views

Rails' MVC vs Microsoft MVC - where to put logics?

Some time ago I switched from Microsoft ASP.NET 2.0 (WebForms, never knew Microsoft's MVC) to Ruby on Rails and learned it's MVC approach, after which some things in ASP.NET MVC seem to be weird. In ...
-4
votes
2answers
74 views

Referencing a C++ DLL from within a C# ASP.NET project using Visual Studio Community 2015 [closed]

This question might be a little odd, but is there any specific way to import a C++ reference into an ASP.NET C# project? The problem I am having is that VS is giving me the following error: ...
1
vote
2answers
89 views

Single Class to Serve as View Model as well as Container for Submitted Form

I see the following design in the code which is part of the default web application project in visual studio: A single data model class in constructed and decorated with various data validation ...
0
votes
0answers
11 views

MVC with out of process Session and web garden

I am using NopCommerce to setup my eCommerce website, and it's built on MVC. Recently I tried to turn my IIS web server into web garden with 4 worker processes. I also implemented StateServer using ...
-3
votes
0answers
57 views

How to retrieve video properties in ASP.NET MVC?

I want to get the duration and size of uploaded video file in the controller.An example is like this: [HttpPost] public ActionResult Upload(HttpPostedFileBase file) { if (file != null) { ...
1
vote
0answers
45 views

Project Design - Separating JS and C# tasks - Risks vs Benefits

I'm in RFP phase working with outsourcing vendors on the 100% rewrite of a fully operational prototype asp.net app that I wrote, to make it commercially viable. I have an idea for a project design ...
5
votes
3answers
319 views

What exactly do I have to pay attention for when choosing Windows Hosting Provider?

This is my first time choosing a hosting company. It is for a web site made in asp.net mvc3. So I was thinking choosing a provider would be easy since I found this page ...
-1
votes
2answers
91 views

What handles the work of video streaming in ASP.NET MVC?

I want to play video using ASP.NET MVC. In my understanding, the model deals with the video files stored in file system and data in database. The controller retrieves the path of video file from model ...
1
vote
1answer
910 views

How to test model binding within an MVC controller when Bind attribute with Include list is used?

Auto-generated action methods in MVC5 make use of the BindAttribute with an Include list that contains the field names in a string literal. Example: // POST: MyTable/Edit/5 // To protect from ...
1
vote
0answers
66 views

Using delegate to handle cross cutting concerns

I am planning to write a net-core library for using with n-tier architecture. In this architecture, i want to handle cross cutting concerns(audit, error handling, logging, validation, transaction ...
3
votes
2answers
164 views

Most efficient strategy for search large text areas for multiple values

I have a requirement for a service that does the following. Take a block of text and identify the server names in it (by name or ip address). So given: Lorem ipsum dolor sit amet, consectetur ...
4
votes
1answer
97 views

How do async action methods maintain their network connnection?

In ASP.Net MVC, the classic (synchronous) way to write an action method is to return ActionResult. More recently, the ability to perform action methods asynchronously was added, by allowing action ...
12
votes
4answers
1k views

This way I'm writing this code is testable, but is there something wrong with it I'm missing?

I have an interface called IContext. For the purposes of this it doesn't really matter what's it does except the following: T GetService<T>(); What this method does is look at the current DI ...
0
votes
1answer
93 views

Data Structure for Form or Survey [closed]

I am planning an app which allows users to complete surveys/forms. I'm having trouble planning the data schema for the forms. I really want to have a data structure which can be mostly automatically ...
4
votes
2answers
189 views

Are Repositories needed any longer in ASP.net 5 & EF7?

I posted a question on github to the EF Team. I got a reply saying it would be better to ask this question here so I will copy and paste it here as we as a link so other can see the few replies on ...
1
vote
5answers
8k views

asp.net mvc vs angular.js model binding

So I've noticed a trend lately of .net web developers using angular.js on the client side of applications and I've become more curious as I play around with angular and compare it to how I would do ...
10
votes
3answers
742 views

Is that good idea to add ViewModel exactly same as Model

I have following layers in my solution: App.Domain App.Service App.Core (maybe you call this one App.DataLayer) App.Web Software design pattern is not my question, I have following Model in Domain ...
1
vote
1answer
205 views

Why use Razor Syntax?

Was doing some reading today about Razor Syntax with MVC Framework and was wondering why would/should I use Razor? What benefit does it provide over doing the same thing in the code behind and/or ...
0
votes
1answer
58 views

Project structure for Web, Api, DAL and ViewModels

I have a ASP .NET WebApi and a Web Project. I'm about to create a DAL class library... Which will be my codefirst/POCO's or possibly edmx files. I'm wondering do I need to have another class library ...
8
votes
7answers
356 views

A property that can represent both a single date and a date range: How to properly model that?

I work in a system that can represent a "shipping estimate" in two ways: A specific date: The item is guaranteed to ship at that date A day interval: The item will be shipped "X to Y" days from ...
1
vote
0answers
49 views

Is there any way to take advantage of portable ViewModels for ASP.Net?

Microsoft supports portability when taking advantage of the MVVM pattern: https://msdn.microsoft.com/en-us/library/hh563947(v=vs.110).aspx This means that I can create a ViewModel that is reusable in ...
0
votes
0answers
135 views

Winform User Control on ASP?

I wrote a C# Winform User Control as follows when Executable is Run: My question is how we can use this Winform C# user control in one ASP Page. I know about WEB User Control and using in ASP but ...
2
votes
2answers
106 views

Where to put User Interface/Domain Model manipulation logic (transferring data from the view to Domain Model)

We are starting on a greenfield project in ASP.NET MVC. I've used the MVC pattern in other stacks (PHP and Ruby) and I keep running into the same problems of where to place business logic, UI logic, ...
2
votes
1answer
247 views

How to refactor services into API, repository and caching (.NET)?

I am working on a .NET project with, which started out as a prototype that now has to scale. We have the ASP.NET MVC stack with Entity Framework (code first). I would like to hear how to scale this ...
5
votes
1answer
179 views

Architecture for Web application to monitor remote servers

So I'm a relatively new programmer, attempting to create a web application (ASP.net) to display the system information (E.G. Status of windows services, disk & resource usage and errors in event ...
0
votes
0answers
54 views

Layer application and token authentication

Suppose we have an application with multiple layers in .Net: Domain layer (entities) Data access layer (entity framework) Business layer Web Services layer (Web Api) Presentation layer (MVC) Now I ...
6
votes
3answers
451 views

Why does everyone put controllers in one folder and views in another?

I'm getting ready to take the bend out of asp and into an mvc framework, asp.net mvc or nancy. Wherever I go, I see folders for controllers/modules and folders for views. Is this just a pavlovian ...
1
vote
1answer
105 views

Let Xamarin clients listen when server send an API

My situation I will make a Xamarin application for Android that can access an ASP.NET MVC webserver with API's. The problem is when I'll send an API to the server, all the connected clients must ...
0
votes
0answers
20 views

Composite ViewModels from many Domain models

I asked a similar question on this site before but from then on things got a little more complicated. I'm trying to find the best way to implement ViewModels which are regularly composed from ...
0
votes
0answers
397 views

How to implement authentication between asp.net MVC application and Web API?

For an upcoming project, we have to build a secured web application with ASP.NET MVC. This web application will communicate with an ASP.NET Web API for all the CRUD actions. The user will have an ...
0
votes
0answers
110 views

Multiple inheritance in ASP.NET MVC Controller

In one case BaseWizardController should implement background functionality of BaseController->BaseConsumerController, in other case it should implement only BaseController. Any ideas how can I do ...
7
votes
5answers
9k views

Should I store images in my database or file system in this application? [duplicate]

I'm using ASP.NET MVC 4 and SQL Server 2012. I have no problem going for either of these solutions but I want to know which one would fit better in the particular application I'm creating now. I'm ...
1
vote
1answer
204 views

Should arguments always be passed to an Action in a MVC controller?

I have a number of controllers that take a 'site' as a parameter within their actions, like so: [AuthoriseSite] public ActionResult Index(string site) { var model = ...
0
votes
0answers
79 views

Implementing a one way web request/response in .NET

What is the better way to implement a request/response in .NET when dealing with just getting an xml web resource for the external source and process it to your system? By the way, to access this xml ...
0
votes
0answers
69 views

Azure Active Directory

I am developing a suite of applications that will be hosted in Azure. Some apps will be for customer use (not public tho, i.e. invited/paid up customers) and some for internal employees. For ...
1
vote
1answer
146 views

Organizing action in MVC controller

I am developing an ASP.NET MVC application, that has a lot of client side interaction ie. a lot of ajax calls to controller actions. Currently I have controllers containing actions (part of the same ...
0
votes
0answers
135 views

Is this approach scalable?

I am working to rewrite a legacy application (C++) to C# ASP.NET MVC with EF6 but plan to upgrade to ASP.NET Core1 and EF Core 1. The database schema is really arcane in that it has a single schema ...
6
votes
1answer
359 views

Does unused code affects the assembly after startup (Memory for example)?

Disclaimer: I come from a PHP background. In PHP, I could have thousands files, which are never loaded, if not needed, due to the autoloader feature (If some code is needed, it would be loaded) How ...
2
votes
1answer
127 views

ASP.NET MVC Middle tier object naming

As a corporate developer who works alone I find myself creating and writing a lot of websites that consist of screens that are basically wrappers for a DB table. So for instance on a screen that ...
94
votes
9answers
58k views

Why shouldn't I use the repository pattern with Entity Framework?

During a job interview, I was asked to explain why the repository pattern isn't a good pattern to work with ORMs like Entity Framework. Why is this the case?
3
votes
0answers
139 views

Log with Application Insights only (NLog vs AI) in Asp MVC

I was going through several blog posts and stackoverflow and programmers and I am still a bit confused. You can install NLog (or some other logging lib) and start logging quite fast and then you can ...