Skip to main content

Questions tagged [asp.net-mvc]

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

Filter by
Sorted by
Tagged with
2 votes
2 answers
159 views

I'm using MVC 5 Core on my Web API and I wanted to know what is the most optimal way of storing an Array into a database? Should I store Arrays, does it matter, or should I parse the array and input ...
ARLCode's user avatar
  • 197
1 vote
2 answers
631 views

Can writing business logic in the view(.cshtml) of an MVC application have an impact on performance (for example, Load time)? Is it the preferable way or are there any other best practices?
Vishal Bhatt's user avatar
1 vote
1 answer
3k views

We have an mvc application that we would like to gradually move to an angular platform. It is a wizard style app with 6-8 pages. We currently have a classic mvc layout. We would like to move to an ...
Esben Skov Pedersen's user avatar
1 vote
1 answer
299 views

I have a discussion with a colleague. He thinks we should inject a mapping class (for mapping the domainmodel to a viewmodel) in a controller. He thinks we now can test the mapping class (which is an ...
Michel's user avatar
  • 971
0 votes
3 answers
3k views

I am discussing the architecture for a new project with some colleagues. The project is relatively small and can be considered as a 'normal' crud web application. Everybody has come up with an ...
Citizen SP's user avatar
5 votes
3 answers
1k views

I've done a number of LOB ASP.NET MVC projects (MVC5) and would like to re-structure how I handle some things for a new project. Specifically, I have a component that I want to re-use throughout ...
jleach's user avatar
  • 2,692
0 votes
1 answer
715 views

I'm working on medium sized ASP.NET MVC 4 web app, that is about 2.5 years old. Around 25-30k lines of code. The project has never followed any of the good .NET design practices. It is a very tightly ...
Grentley's user avatar
  • 125
6 votes
1 answer
2k views

I don't have much experience in caching among web applications, but I am trying to educate myself in the field and try out various techniques and approaches in ASP.NET MVC. The majority of tutorials ...
Tom Pažourek's user avatar
0 votes
1 answer
3k views

I have a top10 table (like top 10 restaurants say). Each top 10 row can have up to 10 top10items associated. Models public class Top10 { public Guid Id { get; set; } [Required(ErrorMessage="...
niico's user avatar
  • 241
2 votes
0 answers
8k views

Would creating a controller's interface a bad idea? I have a controller that derived from ApiController, so knowing that you can only derived one class to a class but able to derived one or more ...
rpmansion's user avatar
  • 247
0 votes
1 answer
87 views

I have seen questions similar to mine, but there are some unusual specifics to mine not covered. I have a SQL SERVER driven ASP.NET web app (website). I am using the older webforms model, not MVC. I ...
user192632's user avatar
2 votes
1 answer
3k views

I've been using Web Forms for way too long now and I want to switch to ASP .NET MVC 5 because I think that it's the "next step" for a ASP .NET developer. I also find it to generate pages a lot faster ...
Lewis Cianci's user avatar
4 votes
1 answer
3k views

I have a large WebApi project with a few dozen controllers. Each controller represents an endpoint prefix, just as a normal MVC project would. For example: CarsController.cs represents http://api....
Ron Brogan's user avatar
1 vote
1 answer
529 views

It happens so that the best practice of using EntityFramework includes taking advantage of the IQueryable inside using block, like: using (var ctx = new SomeDbContext()) { ...(do something with ctx)...
OzrenTkalcecKrznaric's user avatar
0 votes
1 answer
4k views

I am trying to create a partial view (re-used many times) that will prompt the user for data and return that value to the parent view. My best solution so far is to pass to the partial view the name ...
TruthOf42's user avatar
  • 772
1 vote
0 answers
153 views

The page is loaded as a normal MVC page. The ajax is so the user can add items to their model without having to reload the page. Right now there is no Web API in the project. I don't want to add it ...
dolphone bubleine's user avatar
3 votes
2 answers
1k views

We do simple data entry validation with attributes on the viewmodel. Think format of an email address, mandatory clientname, format of a date, the housenumber being numeric etc. Now there are also ...
Michel's user avatar
  • 971
1 vote
0 answers
57 views

So I have a "Bars" table in my database and a "Add a Bar" form which allows a bar owner or manager to add his/her business listing to my website database. I also have a "Beers" table in my database ...
the_endian's user avatar
  • 1,152
1 vote
0 answers
760 views

I'm writing a REST service with Web Api. One of the actions reads an AppSetting value from the web.config during execution. I would assume the web.config is loaded into memory, but during high load, ...
Daniel Minnaar's user avatar
2 votes
1 answer
946 views

I have an asp.net mvc 5 site. I have a places table / POCO with 3 unique constraints (URL, Email & obviously ID). Users are able to add places - but they may violate URL or Email unique ...
niico's user avatar
  • 241
6 votes
1 answer
2k views

We are creating a project using Aurelia/Typescript. For those who don't know what that is, it's basically a better AngularJS (opinionated). Our project runs perfect, except for the fact that we need ...
Brandon's user avatar
  • 213
35 votes
6 answers
47k views

In this MSDN article, the following example code is provided (slightly edited for brevity): public async Task<ActionResult> Details(int? id) { if (id == null) { return new ...
Robert Harvey's user avatar
0 votes
2 answers
826 views

I have developed in the past always classic ASP.NET solution. I am starting currently to develop ASP.NET MVC solutions, but i have a problem understanding what a Model is and what it should contain. ...
STORM's user avatar
  • 149
3 votes
1 answer
808 views

I am 1 of 3 developers. The other 2 use Web API and angular to build web apps. I prefer ASP MVC with a repository and EF. The stated argument is that a service is more secure when accessing the ...
BattlFrog's user avatar
  • 183
3 votes
4 answers
800 views

I recently ran across some code during a review that baffled me a bit. The dev was using structs to organize code within a larger file. I personally don't like the practice but wanted to hear others ...
Botonomous's user avatar
1 vote
2 answers
9k views

I have a webpage and frontend contains pages for Customer, Product and Order part and other parts may be added. The actual implementation is that every part(modul) has its own Controller and every ...
Muflix's user avatar
  • 195
0 votes
1 answer
1k views

I want to implement login system where same user account can be used to login in different web applications. How can I achieve this ? I want to make a similar architecture to Google and Microsoft ...
Ravi Mandal's user avatar
1 vote
1 answer
978 views

I currently have a system where there is a user table, a role table, and a user-roles association table, where one user can be associated to multiple roles (like Admin, BasicUser, etc.). I am able to ...
ITWorker's user avatar
  • 137
-2 votes
1 answer
1k views

Why in, C# ASP.NET MVC Code First project, POCO Classes must have getters and setters ( {get; set; } ) in order to work? public float data { get; set; } or in db context class public DbSet<SGD....
Daniel Santos's user avatar
0 votes
1 answer
146 views

I'm learning .net MVC while developing a simple word list - Eg. When you learn a new language and create a list of words related to a certain topic. I don't think I'm following the rules or good ...
Cornwell's user avatar
  • 117
1 vote
1 answer
562 views

I am creating ASP.Net REST API application and stuck on the part where I should consume the REST service. I am not sure how to find the way let me accomplish the following: 1. I don't want it to be ...
Iglesk's user avatar
  • 113
5 votes
1 answer
1k views

I'm creating a .NET MVC solution that will have two web projects, one for API and for Web. Some models, such as customer, will be the same between the two projects. Is it best to have them kept in a ...
RJP's user avatar
  • 251
1 vote
0 answers
121 views

I'm working with scrum methodology. thus weekly schema updates are performed to the final product. However our customer is already populating the database. How can I update the database without ...
Daniel Santos's user avatar
0 votes
1 answer
225 views

I work at a mostly .NET shop. A coworker has more of a background in open-source MVC (think RoR and Spring MVC). She seems to really enjoy .NET MVC, but she practically refuses to work on Web Forms, ...
Don Cheadle's user avatar
-2 votes
1 answer
119 views

I've been working on a project based off of this tutorial. Unfortunately, the controller classes in this are quite dense and have terrible separation of concerns. I should have realized this ...
J Hache's user avatar
7 votes
1 answer
3k views

The last time I used asp.net 4 years ago, the "ASP.Net Membership provider" was the best way to do user authentication in an ASP.Net application. Nowadays, is using the "ASP.Net Membership provider" ...
Daniel Santos's user avatar
0 votes
1 answer
1k views

After doing some investigation* I have learned that I could potentially have a concurrency problem. I'm currently building a Tournament Platform in ASP.NET MVC 5 with Entity Framework 6. So far, I'...
Jose A's user avatar
  • 305
9 votes
7 answers
17k views

I have spent the last few hours reading up on the use of static classes and trying to figure out if I should be using them or not but still have not come to any sort of conclusion. It seems that the ...
Matthew Verstraete's user avatar
0 votes
1 answer
843 views

My question is not how to call a web page in code but rather what the correct architecture for it would be. I have an MVC web app that displays certain data from our database when the user visits a ...
eddie_cat's user avatar
  • 101
0 votes
1 answer
3k views

I'm trying to understand what happens with dependencies (Ninject) when a same Interface in injected in multiple classes. I am specifying InRequestScope for my bindings so as I understand there should ...
Iztoksson's user avatar
  • 197
0 votes
3 answers
483 views

I am developing program with asp.net MVC and I feel like I'm doing it wrong in these parts: I'm populating all process in controller, because I don't know how to put it in model (how to call it). I ...
Fimblutterr's user avatar
2 votes
1 answer
1k views

I have some methods defined in a controller which most of them returns JsonResult, and some returns PartialViews. So I have two questions, 1) Is it a good practice to access those methods that ...
Shanid's user avatar
  • 177
0 votes
1 answer
2k views

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 ...
niico's user avatar
  • 241
0 votes
1 answer
105 views

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 ...
Matthew Verstraete's user avatar
0 votes
0 answers
2k views

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: @Html.Hidden(&...
Vahx's user avatar
  • 151
3 votes
2 answers
216 views

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 ...
Paul's user avatar
  • 133
-7 votes
2 answers
3k views

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: Error ...
Dave's user avatar
  • 111
1 vote
0 answers
103 views

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 ...
wayfarer's user avatar
  • 195
-5 votes
3 answers
4k views

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 ...
IT_Layman's user avatar
  • 117
3 votes
2 answers
1k views

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 ...
Lobsterpants's user avatar

1 2 3
4
5
12