I need to know how to organize my project in the% cos_de% issue if there is more than one Model in my application.
For example, I have the Model student and Model teacher.
I create a class of type CRUD's to manage my database, but e...
Problem
I'm researching some way to identify and validate workstations, and would like to get some value from the machine that is not changeable, such as IP that can change.
I tried to get MAC address , but it does not seem possible bec...
I started using OO a short time ago and in all projects that I see on the net, I see the following way of declaration.
public class Trabalhador
{
public int Id { get; set; }
public string Nome { get; set; }
public virtual ICollecti...
I have a ActionFilter for some controllers and actions that make use of the user information that is in claims .
The filter itself gets the user's claims information and performs the authorization validation process:
public vo...
When developing a web application, using ASP.NET MVC, I need to return the view layer, data as JSON in the following format:
{
'title': 'Gallery 1',
'description': 'Description of gallery...',
'thumbnail':
[...
I think I'm going wrong with the code below, it should save the Client and redirect to the Client / Index page, but after saving it stays on the same page, using Debug it passes in the Client / Index (Action and View) , but does not open the pag...
I have a project in Asp.Net MVC with the following method:
public ActionResult ObterCursos()
{
List<curso> cursos = new List<curso>();
curso curso_ = new curso();
curso_.Nome = "Análise";
curso_.Periodo = 3;
cu...
I had a question about some of the codes that I found in a project of a former employee of the company. It is a code that contains assignment in the variables parameters. Here is an example:
public ActionResult Teste(long id = 0, String tema =...
Locally I can upload and quietly save a file using the following code
Controller:
public ActionResult CriarProduto(FormCollection form, HttpPostedFileBase file)
{
Produto produto = new Produto();
ProdutoService prod = new ProdutoServi...