I'm developing a solution in object-oriented programming class for web. Let's create a stock control system. One of the first "screens" of access, is the login, only that at the moment, my whole 'application' already goes down.
In the first screen, we have the login field and password, when we click on the 'login' button a method is called, which makes the login to the bank, however the return is always 'invalid login'
Method FazLogin
return Contexto.tblUsuario
.Where(u => u.LOGIN == usuario && u.SENHA == senha).FirstOrDefault() != null;
Through Visual Studio itself, if we query the database, I can see the tblUsuario
table and I can also see my users for testing. In the connection string, it looks like this:
<connectionStrings>
<add name="ModeloEstoqueContextoContainer" connectionString="metadata=res://*/ModeloEstoqueContexto.csdl|res://*/ModeloEstoqueContexto.ssdl|res://*/ModeloEstoqueContexto.msl;provider=System.Data.SqlClient;provider connection string="data source=LENOVO-PC\SQLEXPRESS;initial catalog=ESTOQUE_DATABASE;user id=sa;password=SENHAXXXXX;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings>
We are working on the MVC model, and yes, references have been checked over and over, both by me and by the teacher.
@Cyana, Metadata (Connection String) is automatically generated by the Entity Framework
@pnet, The password is not encrypted, it is a very simple thing we are doing in college, when entering the password, we have a response.Redirect that directs to the other page. When debugging always 'count = 0' and values are null.
I can not get the controller here.