Questions tagged as 'asp.net-mvc'

1
answer

Use of Time with EF 6

I have a class with the following property. public TimeSpan TempoIdeal { get; set; } Estou atribuindo esta propriedade com TempoIdeal = new TimeSpan(days: 3, hours: 15, minutes:10, seconds: 0); When trying to insert I g...
asked by 23.06.2016 / 05:39
1
answer

Permissions system in ASP.NET MVC

I have long developed a system in ASP.NET MVC, where I used the MvcSiteMapProvider package, based on it I made some modifications to the AuthorizeAttribute to perform the user permissions check. In my SiteMap I made some additions, which were...
asked by 08.07.2016 / 13:42
1
answer

Get Penultimate record of a table with Entity Framework

How do I get the penultimate record of a table with Entity Framework     
asked by 30.11.2015 / 17:37
1
answer

Execution order of migrations

Hello On my first job, I worked using code-first with the Entity Framework 4. At this time, I saw a limitation on it: the generated migrations only ran in order. For example, if two people are working with persistence in my branch, generated...
asked by 21.03.2016 / 22:40
1
answer

Specific application of the attribute [ChildActionOnly]

I saw through the ASP.NET MVC documentation that using the [ChildActionOnly] attribute prevents the method from being called directly via GET, only through a specific view. Frankly, I did not get it. Can anyone clarify? Example usage:...
asked by 28.02.2014 / 19:00
1
answer

How to call procedure using Asp.net MVC with Entity Framework

In an asp.net mvc application, using ADO.NET with entity framework and mysql , I have a procedure , which returns a listing. CREATE PROCEDURE SP_CATEGORIAS() BEGIN select * from (select a.id, @row...
asked by 07.08.2015 / 17:55
1
answer

How do I know if a Client is accessing the server over the local network or the internet?

How do I identify if the client is accessing my application, whether it is inside the company (local area network) or outside (internet)?     
asked by 20.08.2015 / 13:25
1
answer

How to get the path of a file (HttpPostedFileBase)?

I would like to get the path from where my file is coming from. Model: [Required(ErrorMessage = "Selecione o arquivo a ser importado.")] [Display(Name = "Arquivo ")] public HttpPostedFileBase Arquivo { get; set; } View: @Ht...
asked by 26.10.2015 / 19:46
2
answers

Can I have more than one Views directory in MVC?

I'm transferring my project to MVC, and would like to know if you can have more than one Views folder in the project, or if you have a CSS load outside of BundleConfig , have a static page somewhere bugar all my pages.     
asked by 06.05.2017 / 20:36
1
answer

Problem with Decimal (4,2)

I have an MVC project, I am using Entity Framkework and in my database there is a table with a column of type decimal (4,2) . The problem is: I try to insert any value, for example: 5.00 // 5,00 // 14.21 // 14,21 and it always re...
asked by 19.05.2015 / 15:29