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...
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; }
}
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?
...
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...
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...
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...
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...
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:...
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?
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...