All Questions
Tagged with asp.net-mvc mvc
18 questions
2
votes
1
answer
4k
views
Member management of Active Directory groups via an ASP.NET MVC website
Background
One of the projects I'm working on is an Intranet website which is a front-end for several kinds of data, each aimed at a different set of users. Access to the website is handled through ...
1
vote
1
answer
2k
views
HttpClient wrapper for simple calls with optional cert
Trying to ensure each controller contains it's own httpclient. The super user can change which endpoint is called from the site and some of those endpoints do not require a certificate, but some ...
4
votes
1
answer
139
views
Read project setting in asp.net mvc
I have a Table that I store All setting in that , it is like below :
...
1
vote
1
answer
3k
views
MVC OnActionExecuted - session cookie - expire after x minutes of inactivity
first time poster here.
I'm creating a session cookie which should expire after 30 minutes of user inactivity. I've added the following code to the base controllers OnActionExecuted method.
...
1
vote
2
answers
207
views
Controller method to update properties of a request
I have a view that displays details of a work order request submitted by a user. As far as security and database querying is concerned, which one of the following options would be better if I'm going ...
10
votes
1
answer
219
views
ASP controller for tracking equipment
This was originally posted here. I'm hoping Code Review will be a little more helpful in giving me a concrete direction.
I've been working on a project based off of this tutorial.
Unfortunately, ...
2
votes
1
answer
791
views
ASP.NET C# MVC thin controller for file validation with service layer
My name is Matt and I have a fat controller problem.
In truth I have limited experience of MVC and I'm trying to learn how to organise my code better so it's more testable and more maintainable. Here'...
2
votes
1
answer
77
views
Validating user access to a function
I was reviewing the following code block and noticed there was validation check at the top. The 3rd line in the function checks if the invoice belongs to the logged in customer.
I am wondering ...
3
votes
1
answer
232
views
Generic Object Editing Classes with Controller, ViewModelProvider and DBUpdater
I am beginning to use generics and would like feedback on the following set of classes that will serve as the basis for an app that contains a large number of basic CRUD-y entities.
I have used ...
5
votes
2
answers
233
views
Keeping data processing out of controllers
I would like to start by mentioning that I am LAMP stack guy who happens to be making my first ever .NET C# web app and I'm seeking general advises for best practices and to see how more experienced ...
2
votes
2
answers
3k
views
Basic survey app
I am learning MVC 5 .NET and this is a bit different than Rails activerecord when creating relations. I have created a basic survey app that has a Survey class and this relates to the questions and ...
3
votes
2
answers
216
views
MVC refactoring parameter check
I had this code repeated in many Actions:
...
5
votes
1
answer
4k
views
Is it an anti-pattern to let ViewModel fill itself from a domain object? [closed]
Let's say you have a Employees table mapped to a Employee class. Now you want to code a Edit page for general information. You need a ViewModel with all the properties you need to build the page, so ...
1
vote
1
answer
1k
views
Check if modelitem refers to currently logged in user with mvc identity
I'm using MVC in order to generate a couple of views within my webpage. For a way of logging in, I've decided to use Asp.net's Identity, which I am very happy with.
However, I'm trying to find an ...
1
vote
1
answer
1k
views
Dependency Injection With Unity in MVC 5 without repository and unit of work
I want to use dependency injection with Unity in my application. I am not following repository pattern and unit-of-work (and don't want to). I also have ViewModel in my controller action method. ...