I have the following static class available for the entire application:
public static class MinhaClasse
{
public static void Salvar(Item meuItem)
{
using (MeuEntities db = new MeuEntities())
{
db.Item.Add(meuItem...
I have a button and I wanted to program click of it, and when I use <asp:Button> I program click of it in code behind . I'm now using a button normal.
I know almost nothing about JavaScript and wanted to pro...
I'm creating an Asp.Net MVC project and found a problem in View.
See the code:
<script>
var data = [];
for (var i = 0; i < '@(Model.Count())'; i++) {
data[i] = {
"source": '@(Model.ElementAtOrDefault(0).Source)',...
I'm trying to learn C # but I'm having a hard time understanding the file and folder hierarchy of Visual Studio 2013 Solution Explorer.
I can not understand why there are two .cs files, one for the design and another for the program itse...
What is the Uri class and what is its purpose and where should I use it?
Can not pass an object from it to a string variable see in the example:
String caminho = new Uri(@"c:\Windows");
Generate the following error:
Error 1...
I have the following structure:
struct cores
{
int r, g, b;
public cores(int r, int g, int b)
{
this.r = r;
this.g = g;
this.b = b;
}
}
If I have a new structure printed, it looks like this:
Consol...
I realized that I do not have the choice of a project in Windows Form Application in Visual Studio 2017.
I looked, and saw that there is a possibility of selecting the option during the installation.
Once Visual Studio has been inst...
There are situations in which we have fields that represent a type of response, whether they are boolean sim and não , S and N or with multiple answers like the status of something. For example the status of a course c...
Visual Studio 2017 suggested something that surprised me, creating an object without using the new operator, I was surprised because I'm coming from Java and it's been a year since I was stopped and I decided to go back to school.
Well, when...
In a C # MVC project, is it okay to access data within the model ? For example:
public class Cliente
{
public int Id { get; set; }
public string Nome { get; set; }
//outros atributos...
public void Inserir(){
Client...