Questions tagged as 'asp.net-mvc'

1
answer

Entity Framework - Problem in relationship association 1 to 0..1

I'm having an association problem between two tables. Student and Student tables_Course_Unit. Public class Aluno { [Key] public int cod_aluno { get; set; } ........ public virtual Aluno_Unidade_Curso Aluno_Unidade_Curso { ge...
asked by 20.04.2016 / 22:41
1
answer

Passing id for new MVC 4 controller

Continuing the previous topic ( User add date for List MVC 4 ) I have a new question. You can see in that topic the initial question and the answer that was given to me, but I needed to respond to it but I am not allowed. Following the user's re...
asked by 25.04.2016 / 15:57
1
answer

Save IEnumerableT inside a parent entity with LINQ

Dear, I have the following classes: public class Foto { [Key] public int Id { get; set; } [StringLength(500)] [Required(ErrorMessage = "Obrigatório")] public string Nome { get; set; } public int Item...
asked by 14.01.2016 / 14:36
2
answers

Is it possible to send data from the typed view with IEnumerable to the Controller? [duplicate]

I'm sending data using a get and get in the controller using a QueryString, the problem is that the value goes in a format without the decimal places, so when I have a value of type 10,20, it is sending only 1020 value. @model IEnumerable<...
asked by 09.01.2016 / 22:22
1
answer

Ajax - Protect WebServices

I'm building an ASP.NET MVC application and I make lots of calls to actions and webservices via ajax (jquery or angularjs). How could I hide these calls, or make sure they are only made by my application? For example: $('#btnNext').clic...
asked by 22.01.2016 / 13:59
1
answer

How do I disable this notification? "Based on your project, we have identified extensions you may find helpful"

Ihavenoideawhyitstartedtoappear,IimagineitwasanupgradetoVisualStudio,butitannoysme,anditkeepspoppingupevenafterclickingon"Dont 'Show Again." How do I get rid of this thing?     
asked by 28.12.2015 / 12:42
1
answer

How to create master-detail form using a ViewModel

I have a viewmodel in my project. Inside it I have two entities which are a list of items. I'm doing the data-editing logic for these entities that are within the viewmodel . I have 5 entities in all. The ones that are not a list, I get th...
asked by 20.06.2016 / 04:44
1
answer

How to insert an information of a model that has a Relationship?

I have a list of Products and this listing has the vendor code, I need to enter the vendor name in that listing. My Controller: public ActionResult Index() { IEnumerable<Produto> produtos = db.Produto...
asked by 03.12.2015 / 20:08
1
answer

Modify HttpContext.Current.User is breaking the optimization bundle

I've run a couple of tests and found that by modifying HttpContext.Current.User Application_PostAuthenticateRequest (Global.asax.cs) I get an Internal Server Error in the concatenated / mined bundle request. Follow the code quoted:...
asked by 14.12.2015 / 22:13
2
answers

Using distinct with Entity Framework

I have an object with a structure something like this: Date Description I'm thinking a distinct() in the description field because the records are ridiculously repeated. The question is, does distinct() only consider th...
asked by 17.12.2015 / 17:35