Questions tagged as 'asp.net-mvc'

1
answer

Unit of Work with repository

In ASP.NET MVC & Entity Framework , because many examples and some open-source projects we find a unit of work together with repository pattern and DbContext is already a unit of work, including projects with IoC and DI...
asked by 20.09.2014 / 23:06
1
answer

Primary key composed with entities in the Entity Framework

I need to make a composite primary key relationship in the entity framework using the entities themselves. public class ProjetoDocumento { public Projeto Projeto { get; set; } public Documento Documento { get; set; } }     
asked by 13.03.2015 / 04:27
1
answer

Exchanging Entity Framework EDMX by Code First

I have an application with EF5 using EDMX modeling and I have much more experience and affinity with Code First. Does anyone have any idea / tutorial on how to migrate from EDMX to Code First without changing the database and entity classes?   ...
asked by 10.03.2015 / 13:42
1
answer

Error: Could not load file or assembly 'DotNetOpenAuth.AspNet' or one of its dependencies

I'm having this error running the application:    Could not load file or assembly 'DotNetOpenAuth.AspNet' or one of its   dependencies. The parameter is incorrect. (Exception from HRESULT:   0x80070057 (E_INVALIDARG)) The start will be pr...
asked by 06.02.2015 / 15:22
1
answer

Error decrypting string

I have a method for encrypting and decrypting data. I tested it in Console Application and it works perfectly. When I take this method to the controller, I get the following error:    Invalid length for an array or Base64 string. This occ...
asked by 21.01.2015 / 18:28
1
answer

Validations in Webpapi

I'm starting to study webapi with knockout , using a classe f% as an example I made my model , in knockout I made the list and include it, in my classe I have decorated the attributes with some data annotation...
asked by 05.08.2014 / 22:51
2
answers

Concurrent client side and server side requests

When using Ajax, I create an asynchronous request for my server. If I use N ajax requests simultaneously, am I still handling these requests synchronously on the server? If yes, to create an asynchronous request on both the client-side and th...
asked by 30.07.2014 / 20:24
1
answer

Appcache in Asp.net MVC

I need to use the html5 appcache to store some web pages. Before using MVC I simply made this regular expression to check whether it is connected or not. var offlinePages = /^\/(index|about|schedule|location).htm$/; And in this loop I test:...
asked by 15.08.2014 / 16:17
1
answer

Get values through get method parameters

I have action that sends by parameters the codCliente : //master/CadastrarEndereco?codigoCliente=1011 How do I get this value codigoCliente in my controller so that I can persist the value in the DB?     
asked by 18.11.2014 / 20:34
2
answers

How to instantiate primary key in another MVC class?

I have class Funcionario and Projeto . Both have their Id's. I want to create a class ProjetoFuncionario and would like to instantiate the primary key of the two in this class. How can I do it? namespace Exercicio1.Mo...
asked by 14.11.2014 / 14:46