Questions tagged [asp.net-mvc5]
19 questions
59
votes
4 answers
Should I be using both AngularJS and ASP.NET MVC?
I started learning AngularJS and ASP.NET MVC, but am not sure why to use them both together in the same project?
Aren't they both MVC frameworks? Should I be using them both in the same application? Isn't it one or the other?

Natalie
- 727
- 1
- 5
- 7
8
votes
4 answers
Correct Way to Implementing Authorization Checks in ASP MVC
In ASP MVC we have the Authorize attribute to perform check at either a controller level or at a controller method level. But what if you need to do check permissions inside a controller method e.g let say your doing some update or create action to…

adam78
- 291
- 3
- 9
5
votes
1 answer
Plugin Strategy For MVC 5 Site
I am working on setting up a multi-tenant site, where users can select a theme. Each of these themes have different settings, so I would like someone to be able to select a theme and then when they edit their site settings it would bring up a form…

Wade73
- 191
- 1
- 9
3
votes
1 answer
MVC - Problems with passing ViewModel directly to / from repository
I have an ASP.NET MVC 5 site.
I have several complex view models - usually subsets of a far larger model. Should I create items in the repository that take the ViewModels - then just use Dapper.net to map them to some SQL?
If not I would have to map…

niico
- 241
- 3
- 11
2
votes
4 answers
How to automate certains tasks in a web application?
I'm working on my final project for a course named Web Applications in ASP.NET.
Basically, it's a web application for shopkeepers to manage their clients' money accounts in their stores.
In order to open an account, the shopkeeper and the other…

GianMS
- 201
- 2
- 5
2
votes
2 answers
Proper MVC5 Layered Implementation
I am fairly new to MVC5 Development and I have been doing a lot of reading about Layered Design, DI, IoC, etc... I feel that I am getting a grasp of concepts, however when it comes down to writing a good example I struggle. To ask my question I…

Bojan
- 131
- 5
2
votes
2 answers
ModelState Validation vs JQuery vs Remote
I was stuck with some validations for quite a while. I have been thoroughly searching the internet to find ways to apply the validations I require. I came across many methods for validations even certain Nuget packages. But in most cases my…

Vini
- 216
- 1
- 2
- 12
2
votes
1 answer
How do you handle saving blog tags in MVC?
I'm writing my own blog engine as a learning exercise. The blog is fairly functional right now but I'm trying to add a 'tag' feature to it and I'm confused as to what the best way to handle saving a list of tags back to my controller.
My…

Dan Beaulieu
- 109
- 1
- 13
1
vote
2 answers
Encrypt data in code or stored procedures?
I'm working on a Web App where the data is quite sensitive and is required to be encrypted before it is stored in the database.
Now there are two ways through which I can achieve this:
Encrypt data in the code
Encrypt data in stored procedures…

Rida Iftikhar
- 23
- 5
1
vote
0 answers
MVC remote validation approach
I have a model, the model has 2 strings; foo and bar.
foo is what it is, it will be one of x amount of possible values (it's not an enum, though).
bar is entered by the user, so I want to validate it. But I want the validation to be driven by foo,…

JᴀʏMᴇᴇ
- 2,361
- 4
- 22
- 25
1
vote
2 answers
Where to store translations for values to their corresponding display texts?
This is probably a naive question but I'm trying to figure out the industry best practice for working with magic numbers and their corresponding display texts. For example, whether a transaction is debit or credit might be stored as a bit field in…

Achilles
- 435
- 4
- 11
1
vote
1 answer
Should I create a new Model for a filtered view of Existing model?
I am new to MVC, and just inherited a project that is still in it's early stages.
The scope is a user interface to manage a single SQL table. There is a model that represents the entire table (select * from table). The previous programmer also…

Dave Kelly
- 11
- 2
1
vote
1 answer
Databaseless ASP.NET MVC 5 on top of an external REST API
Where you would envision an out-of the-box ASP.NET MVC 5 web application on top of an MSSQL database, I have now been placed in a situation where I'm supposed to use custom external token endpoints and use bearer tokens to make authenticated API…

Wim Ombelets
- 813
- 8
- 15
1
vote
1 answer
Entity Framework 6 and Stored Procedures
I'm new to Entity Framework, and currently developing an MVC 5 application with Code-First Entity Framework 6.1.2.
I need to write custom reports. Instead of writing complex linq, I can write a couple quick Stored Proc's and write the results to…

chatters
- 25
- 1
- 4
0
votes
2 answers
Asp.Net Mvc 5 / Web Api 2 unit testing data access layer
Let's say I have IRepository interface implemented by Repository class(uses database context to implement IRepository methods). And IUnitOfWork interface implemented by UnitOfWork class using IRepository.
My questions are:
1) Should I unit test…

David Maisuradze
- 145
- 1
- 2
- 8