Questions tagged as 'asp.net-mvc'

3
answers

Entity FrameWork relationship many x many extra field

Good morning, I am studying the FrameWork Entity Code First and am wondering how I should create a NxN template with extra information in the relationship table. For example: Let's assume the following relationship (image taken from the MS...
asked by 10.09.2014 / 15:48
2
answers

Compare date time with a timespan

In asp mvc 4, I'm doing a query where I'll get the data where hours are less than or equal to those entered by the user. That is, I have a dateTime and I check with the variable entered by the user (a TimeSpan ) if it is lowe...
asked by 18.03.2014 / 16:11
2
answers

How to create a View for this Model case?

I've been trying to work around this issue (#) into a problem I'm having but I'm not getting a positive result. I'm getting an array with on's variants instead of getting an array with id's , as I imagined it to be. I have the following...
asked by 23.03.2014 / 16:22
2
answers

Why use Bytes instead of using Image? What is the best practice?

I'd like to know why to use the data type Bytes instead of using Image itself. If the SQL Server database has the Image data type, then it should be easier and more convenient to insert it in Image right mode? I would lik...
asked by 10.02.2014 / 19:25
1
answer

How to produce JSON in the format that Highcharts expects?

I have the following code in C #: Dictionary<string, object> dataResult = new Dictionary<string, object>(); dataResult["data"] = new List<object[]>(); dataResult["name"] = i; foreach (var item in query) { object[] values...
asked by 15.02.2014 / 13:57
1
answer

EntityFramework 6 + LazyLoadingEnabled + using ()

I need a help. My problem is this: I can not return the items of my object. Follow my code for review. Client Class public partial class Cliente { public Cliente() { this.ClienteEndereco = new HashSet<ClienteEndereco&g...
asked by 22.05.2015 / 16:55
2
answers

Show whitespace for Null value in Views

When I send some value null to my view , and Razor tries to render the value, an exception is returned. Is there a way, when view gets a null value, render this as a blank space without having to do checks with if ?     
asked by 07.05.2015 / 15:17
1
answer

System.Web.resources.dll not found

We have a mvc3 / dotnet4 project, which consumes DCOM (c ++) servers through intertops. Both DCOM (c ++) servers and the mvc3 (c #) project were compiled with visual studio 2013. The projects have been migrated to visual studio 2015. In...
asked by 21.09.2015 / 15:29
1
answer

Presenting message in a view via the C # MVC Controller

Looking for a solution I found a form on the link Controller message for the view But my problem is that nothing is displayed. I do not know if it's because I do not have an action in View but the message does not appear. The structure i...
asked by 06.01.2016 / 14:39
1
answer

Custom RoleProvider

I'm implementing authentication with% custom%. I have a class RoleProvider and a class Usuario with many to many relationship. I created a folder in the project called Role and within the folder a class named Securi...
asked by 11.03.2014 / 00:16