I'm developing an ASP.NET MVC 4 application and need to save the log of every change made to a Model object.
Is there any native method or implementation already known that does this? Example:
public class Pessoa
{
public int? Id { ge...
There is a class that has 12 properties, which may be mandatory, optional or non-existent depending on the business rule specified in the registration of another class.
How would I be able to compile a View that displays only the requi...
I have two classes:
User > Contains your PK (ID).
UsuarioP > Contains user ID (FK).
Class User.cs
public Usuario()
{
this.UsuariosP = new List<UsuarioP>();
}
public int Id { get; set; }
(...)
public virtual ICo...
I wonder if it's possible to get the name of ActionResult that called View .
I know that View normally has the same name as ActionResult , but in my case, I have a single view for two ActionResult different, henc...
My scenario is as follows. I have an MVC 4 application. On my controller I check the logged in user and password. (I think) I put user data in a session after the data is verified and correct.
My pages are cshtml (Razor). And I have a master...
I'm developing a project, where I use upload files, as well as an information registry. Both the file and the information are registered in the same form. So far so good, but it's usually that when there is a larger file, it takes about 20 to 30...
I have a question, I have this code below in controller :
[Authorize]
public JsonResult Teste()
{
var licencas = new List<Object>();
licencas.Add(new {
Responsavel = "José",...
I'm developing with MVC, and I have the view list
[...]
var columns = new WebGridColumn[] {
grid.Column("Id"),
grid.Column("Descricao"),
grid.Column("UsuarioModificacao"),
grid.Column("DataModificacao"),...
What could be wrong with this example?
I can not do this:
var pessoa = new Pessoa
(
PessoaId = 1,
Nome = "teste teste",
twitter = "@teste"
);
Error message:
'Name' does not exis...
How do I capture the real IP / Public IP of the user who is accessing the application? The IP of the computer I can capture normally, but I want to know the public IP of that client.