Questions tagged as 'asp.net-mvc'

1
answer

Repeat div with foreach?

I have a list of registered users that displays the most important data such as name and email. I've created a div to display this data. However, I do not want to display everything in the same div, I would like to create a way to repeat this di...
asked by 10.11.2014 / 18:58
3
answers

Independent project Injection of Dependencies Ninject

Hello! I'm using the DDD-type architecture to do a project, in it I have the CrossCutting layer, and on this layer I thought of adding a class library project with Ninject so it does not stay in the presentation part. I made a few attempts bu...
asked by 27.10.2014 / 19:44
1
answer

How do I delete this method

I can not call the methods: DeleteOnSubmit and also method: DeleteObject . See below my code and how I make a delete in it. public static void deletaRuptura(int _idmotivo) { RupturaEntities db = new RupturaEnti...
asked by 30.09.2014 / 13:27
2
answers

Authorize stopped working

Follow my codes Login: public ActionResult Login(login login, string returnUrl) {  if (ModelState.IsValid)             {                 if (new AllFictionMembershipProvider().ValidateUser(login.email, login.senha))              ...
asked by 25.09.2014 / 23:39
1
answer

How to customize routes?

I have a controller named login and a view of the same name. When I access the login page, the URL is displayed like this: ~/Login/Login You can customize this route so that the link looks like this: ~/Login ?     
asked by 25.09.2014 / 05:15
1
answer

Linq does not return data. There is data in the table and I return by query

I tried to make a LINQ very similar to my query. This is my query. select * from PDV where tipo_PDV = 'R' and UF = 'DF' and Cidade = 'BRASILIA-DF' This is my LINQ var resultado_rede_descricao = (from _pdv in db.PDV...
asked by 02.10.2014 / 13:56
1
answer

Get Model in the View with values coming from the database

I have this class: public class MontaArvoreAcao { public int IDRuptura { get; set; } public DateTime DataRuptura { get; set; } public int IDMotivo { get; set; } public string Motivo { get; set; } public int IDOrigem { get;...
asked by 15.09.2014 / 13:37
1
answer

Map routes works only the default

I'm having a problem with my project. I have two routes, the "Default" and a test, but I do not know if it is done correctly because it does not work when they put in the url what I put there, it works only the "Default" public static void Reg...
asked by 23.08.2014 / 06:27
1
answer

Doubt on how to set the type to return a list

I need to return some lists for my view. I am using ViewData. But have a problem, at the time of declaring the variable, I do not know what kind to put. I made the following form and it is giving the following error: foreach statement cannot...
asked by 18.09.2014 / 20:51
1
answer

Entity Framework without primary key

I have the following problem: Whenever I update the model diagram of my project, it loses the reference of which field is the primary key, even I try the PK in the table in my Bank. Anyone have any idea what might be causing this?   ...
asked by 18.09.2014 / 20:22