Questions tagged as 'asp.net-mvc-5'

1
answer

put Custom Message in PT-BR in required field

Assign Required="true" to a password field, but the message is in English, as can be seen in the image below: IwantedtocustomizethismessagebyleavingitinPT-BR<divclass="form-group"> @Html.LabelFor(model => model.Senha,...
asked by 22.01.2017 / 15:12
1
answer

When changing a Model, how to redo Scaffolding?

I have a model, called CombustivelModels , where I made a Scaffolding generating Controller and Views , my doubt is, when doing a revision in this Model , you can update via Scaffolding o Controller...
asked by 30.11.2016 / 14:39
1
answer

Asp.Net Razor with Json

I have a question and I already researched several sites but I did not get the answer. I develop systems in .Net with C # in the MVC standard and use the on-screen presentation in the traditional View with Razor form. It turns out that I ha...
asked by 05.04.2017 / 18:21
2
answers

Error Generating Scaffold

I made the scaffolding generating the controller, and Index is experiencing an error in    (f = > f.Cargo) with this error:    Can not convert lambda expression to type 'string' because it is not a   delegate the class Employee...
asked by 10.11.2016 / 23:27
1
answer

Bundle problem on the server

Good morning, I was implementing the use of bundle in my ASP.NET MVC project, in the development environment worked perfectly. But when I go to the server it does not work. I was debugging in the browser and it gives the following return: "Resou...
asked by 07.07.2016 / 16:33
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

Routine included in ThreadPool to run in "background" does not let the application continue running

I have the following code snippet in a method of my ASP.NET MVC application that tries to delete the directories and their files. // efetuo processos de remoção de arquivos do banco de dados await Context.SaveChangesAsync(); var itens = diret...
asked by 06.04.2016 / 18:37
1
answer

Update multiple database using code first without using console

Good afternoon, guys. I have an application that every client owns their database and I'm using code first. To update I'm always running the command update-database -force in the package console for each client database. Does anyone...
asked by 23.08.2016 / 21:26
1
answer

DropDownListFor in a for

I am trying to fill a DropDownList with a selected value within a for , but it is not working properly. What happens is that when Action Index returns the model to View , values are not being selected, always being the...
asked by 29.12.2015 / 14:44
2
answers

Association 1 to 1 Entity

I have a relationship between Address and Academy where 1 address has 1 gym, and 1 gym has 1 address. Academy Class: public class Academia { [Key] public int AcademiaID { get; set; } ... //relacionamentos public int Ende...
asked by 19.01.2017 / 03:40