ASP.NET MVC 4 is the fourth major version of the ASP.NET Model-View-Controller platform for web applications.
-1
votes
1answer
35 views
ASP.NET MVC 4 Shopping Cart - Cannot update shopping car items using JQuery , Ajax, jSON, jGrid [closed]
I have this code in a C# MVC 4 VS2012 project. I need to be able to update the shopping cart with jSON data using JQuery/AJAX, i'm using jqGrid to display the data and pulling the shopping cart items ...
1
vote
0answers
37 views
Best practices in implementing service methods
Consider the following architecture: ASP.NET MVC Application having controllers which depend on service classes (MembershipService, EmailService etc.) which in turn depend on data access context ...
1
vote
2answers
31 views
MVC : Does code to save data is session or cache 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
1answer
53 views
Truncate port number from absolute Uri
We had a requirement to remove the port number from the Request.Url.AbsoluteUr i.e
Actual:
https://mysitename:443/Home/Index
Excepted:
https://mysitename/Home/Index
The code I used for ...
2
votes
1answer
54 views
Cropping and combining two images on server
I've coded following two methods to combine images that are HTTP POSTed to the server:
// Crops two squares out of two separate images
// And then combines them into single image that's returned as ...
0
votes
0answers
30 views
A Repository for Good ASP.NET MVC Practices
I have an open source project on GitHub. It is an ASP.NET MVC 4 application using Entity Framework and a handful of other utilities. I decided to create this project after spending about a year ...
1
vote
1answer
81 views
MVC4 Linq to Sql Model Structure
Goal: To pass a list of related objects into a view which can then be iterated over using razor syntax.
I'm new to LINQ and MVC4. I'm trying to use the repository pattern to manage my model creation. ...
3
votes
0answers
56 views
Injecting SelectList objects into ViewData to enable using EditorFor on dropdown based properties?
I have developed a system whereby I use an attribute to state which SelectList to use for an 'FK' property. I would appreciate some feedback mainly on by good practice, and also on any ways to do this ...
3
votes
0answers
107 views
Is this the right way to inject AutoMapper profiles
I'd like to know if I'm doing profile configuration in the wrong place or in the wrong way.
I'm following the Onion Architecture. So that restricts the direction of my dependencies towards the ...
6
votes
1answer
100 views
passing a selectlist to the view based on database models from viewmodel is a MVC anti-pattern?
We need to select a model reference from a view.
To do this we need to add a dropdownlistfor.
this is based on a selectlist containing database models.
passing selectlists by viewbag
this solves our ...
1
vote
1answer
105 views
What should I do to improve my first MVC 4 application built with C#
I've started learning .NET with MVC 4 in C# and I built a basic application to display records from a MySQL database. It's incredibly basic, but it's the best I could come up with being a complete ...
0
votes
0answers
41 views
modal window with form
First, Sorry for my English.
I'm very new in web development. I want that you make code review of my code.
I have profile page where contains two tabs:User Info and Violations. In the User Info tab ...
1
vote
0answers
23 views
PBKDF2 Authorization first go, is this optimal?
I've discovered that using hashed passwords with salts is much better idea than MD5/SHA256 so I'm not hashing them with PBKDF2. However I'm wondering if this is correct approach to authorize my user. ...
1
vote
1answer
468 views
Entity Framework & Unit Of Work Design issue with Repository & DI, Please Help
I am facing a problem to save data using UnitOfWork. I mean I am unable to save data using UnitOFWork.Commit() from Controller class. My Implementation check bellow.
IUnitOfWork
public interface ...
1
vote
1answer
94 views
How to dynamically Generate Sort strings for Data Layer from Controller
I need help refactoring this code to dynamically generate a sort string that I can send to my data layer so that my database does the sorting instead of it happening in memory. I am using MVC4 with ...