Questions tagged as 'asp.net-mvc'

2
answers

What is AntiForgeryToken?

What is AntiForgeryToken and what does it serve in an ASP.Net MVC application?     
asked by 09.09.2015 / 20:20
3
answers

Write TimeSpan in full

I want to write a static class (can be Extension ) to represent the value of a structure TimeSpan " in full, in Portuguese. The idea is to always compare the current date ( Datetime.Now ) with the date that the event occurred....
asked by 24.08.2015 / 19:26
4
answers

Should I use GUID or int as a primary key?

I'm about to start a new project in MVC 4 with Entity Framework, searching I found several examples here in the SOpt of models that use GUID as ID and some doubts have arisen: What is the advantage of using GUID as a primary key? Is it feas...
asked by 19.06.2014 / 21:38
3
answers

ASP.Net MVC or WebAPI?

What is the advantage of using MVC and WebAPI (using Visual Studio and C #)? I think developing in MVC is easier than putting together a form with validations, so just put special attributes for this purpose and use the Wizard that already as...
asked by 02.02.2015 / 14:54
2
answers

ASP.NET MVC Paging

I currently work with data like this: The context returns me all the Bank Customers public IEnumerable<Clientes> ListarTodos() { return contexto.Clientes.ToList(); } In the controller I call ListAll () pub...
asked by 07.07.2014 / 16:27
2
answers

What is ASP.Net vNext? What is the correct name?

Okay, I know that ASP.Net vNext is the new version of ASP.Net being released by Microsoft in 2015 and it brings great changes changing how we work various things. This vNext name was used as the working name. Initially I had the idea that thi...
asked by 26.02.2015 / 14:08
1
answer

ASP.NET MVC - Attribute that writes to a View

I need to write a Attribute that writes a mask validation to View. For example, I would like to mark a property in the Model with a [CEP] , write the following in the View: <script type='text/javascript'> $(docu...
asked by 17.03.2014 / 23:59
1
answer

Best Practices for Inserting, Altering, and Deleting with EntityFramework

For deletion of records you may not have, but for Insertion and Amendment I believe there should already be something discussed. The best recommended practice on Insertion and Change is ViewModel's , where you create a view that is appropri...
asked by 26.10.2014 / 16:24
2
answers

How to create a list of dates with specific day

I'm working on ASP with MVC 4, and I create a list of dates from the data entered by the user. For example, the user enters the day of the month in which a certain occurrence will be made. It also inserts the start date where it will start and t...
asked by 04.02.2014 / 11:19
5
answers

Get national holidays

I am making an application and would like to know if there is any way to get national holidays. For example: Some Google Calendar API where I can get some XML to consume ..     
asked by 25.06.2015 / 20:55