Posts by HeyJoe • 819 points
40 posts
-
0
votes1
answer236
viewsQ: How to solve this diamond inheritance problem
Can anyone solve this problem (diamond heritage) with the use of Interfaces and post here in c#? I found it in this post: Why C# does not allow multiple inheritances? but I couldn’t solve it.…
-
-1
votes3
answers63
viewsQ: Business rule in a personal system
Concept of business rule They are statements about how the company does business. They reflect business policies. Organizations with this have policies for meet business objectives, satisfy…
business-ruleasked HeyJoe 819 -
2
votes1
answer244
viewsQ: Private class in C#
I have a class Pessoa.cs private, but I can call her in some other class, for example I created a class called Parametro.cs; I can instantiate the class private Pessoa without the slightest problem.…
-
7
votes2
answers2693
viewsQ: What is a domain class?
What is a domain class? Why "domain"? Are there methods that it should not have (which is not its function to have determined type of method)? It admits what kind of methods?
-
-1
votes2
answers78
viewsQ: Method without any code
Following a book, I created a project windows forms application. I put in the form one textBox and a button. In the onclick of button taken the value of textBox and the attribute to the text of…
-
2
votes1
answer189
viewsQ: Runtime object example in C#
Reading an article appeared the following term Runtime Object or "runtime object". What would that object be? Would it be an instance of a class? Someone could pass some example? The part of the…
-
5
votes2
answers337
viewsQ: Real example of the use of encapsulation
I researched about encapsulation, I even read some topics here, but I haven’t seen a real example of how to use it in a way that can show me its advantages, what problems it avoids. I have an…
-
0
votes1
answer352
viewsQ: Field without REQUIRED is being mandatory, why?
using ExemploValidacao.Models; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Net.Mail; using System.Web; using System.Web.Mvc;…
asp.net-mvcasked HeyJoe 819 -
1
votes2
answers4875
viewsA: Visual Studio 2012 - Recover Deleted File
The only "solution" I found was this: when we delete a file, be it a class or a View, from Visual Studio 2012, they go to the recycle bin. So if you have not cleaned the recycle bin, there is still…
visual-studioanswered HeyJoe 819 -
0
votes1
answer81
viewsQ: How to quote a message
if(string.IsNullOrEmpty(pessoa.Nome)) { ModelState.AddModelError("Nome", "O campo nome é obrigatório"); } How do I quote inside the message? Ex.: The "name" field is required.…
asp.net-mvcasked HeyJoe 819 -
1
votes1
answer61
viewsQ: Two actions for the same View
I have these two action: public ActionResult Lista(int PessoaId, string Nome, string Twitter) { Pessoa p = new Pessoa(); p.PessoaId = PessoaId; p.Nome = Nome; p.Twitter = Twitter; return View(p); }…
-
5
votes2
answers1194
viewsQ: What is an Engine?
I read an article about Razor. That article says it’s a engine view, but what comes to be a engine? According to the article Razor is a new syntax that works with CSS and HTML to make life easier…
-
1
votes2
answers4875
viewsQ: Visual Studio 2012 - Recover Deleted File
It has how to recover some deleted file such as a class or html page in visual studio 2012?
visual-studioasked HeyJoe 819 -
2
votes2
answers760
viewsQ: Instantiate class with Static method
namespace Classes { class Program { static void Main(string[] args) { Editora ed = new Editora(); Program p = new Program(); ed = p.EntradaDeDados(); ed.InserirProvedorSql(ed); } public Editora…
-
3
votes1
answer2635
viewsQ: SQL SERVER - RELATIONSHIP 1:N
I have two tables: books and publishers. Their relationship was defined as follows, a book may have a publishing house and a publishing house may be in several books, i.e., 1:N. I learned that the…
-
1
votes1
answer91
viewsQ: SQL Constraints fits as DML or DDL?
DDL - Data Definition language: is used to create and change tables (CREATE, ALTER, etc.), right? DML - Data Manipulation language: is used for handling table data (INSERT, UPDATE, DELETE, SELECT).…
-
1
votes2
answers751
viewsA: Entityframework - new table not created
I discovered the problem, the connectionString was just in the App.config Dataaccess, I put in the Console and solved. Again it was a problem with connectionString.
-
2
votes2
answers751
viewsQ: Entityframework - new table not created
Following this tutorial the tables were created all right. Then I took a test, created a new entity, did the update-database and no creating the table in SQL Server 2012. I made some changes to the…
-
2
votes3
answers86
viewsQ: Why do you print the variable type instead of the result?
See the method below: public void TesteLambda() { List<String> selecoes = new List<string>(); selecoes.Add("USA"); selecoes.Add("Brasil"); selecoes.Add("Itália"); selecoes.Add("França");…
-
0
votes1
answer39
viewsA: Entity Framework - Fluent API - Error
The problem has been solved. The public in class Curso.
entity-frameworkanswered HeyJoe 819 -
0
votes1
answer39
viewsQ: Entity Framework - Fluent API - Error
I’m following this tutorial. Creating the class below gave an error: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using…
entity-frameworkasked HeyJoe 819 -
1
votes2
answers185
viewsQ: Entity Framework - rename Foreignkey
I have the classes: [Table("Editora")] public class Editora { [Key] public int EditoraID { get; set; } public string nome { get; set; } public List<Livro> livros { get; set; } public…
-
1
votes1
answer309
viewsA: Entity Framework - Error?
There were two problems, the one of the message in my question that was solved after I removed the constructor from the context class: public class SchoolContext : DbContext { public SchoolContext()…
-
2
votes1
answer309
viewsQ: Entity Framework - Error?
I’m following a tutorial from Entity framework: Simple Code First Example it is quite simple, but for some reason it is not working here and appears the error message is as follows: Aspnet Projects…
-
0
votes1
answer134
viewsA: SQL Server 2012 - SQL Server authentication login
I found the solution here: http://pt.wikihow.com/Redefinir-a-Senha-de-Administrador-do-Sistema-no-SQL-Server In my case, I logged in with Windows authentication, then went to the "security - logins"…
-
0
votes1
answer134
viewsQ: SQL Server 2012 - SQL Server authentication login
At the installation I put a password and wrote it down. When I am going to log in for SQL server authentication the login field is empty, I just wrote down the password I don’t know the login. I…
-
3
votes2
answers96
viewsQ: Entity Framework - tables not created
I am following an Entity Framework booklet, created the classes: public class k19Context : DbContext { public k19Context() : base("k19Context") { } public DbSet<Turma> Turmas { get; set; }…
-
0
votes1
answer103
viewsQ: Tag with display: None - Asp net
I have some tags <h3>, <p> with display: none or empty (usually use to display messages or some div), when clicking on some system event, these tags appear: display: block or are filled…
-
1
votes1
answer91
viewsA: Focus() net Asp method
Fiz em Javascript: document.getElementById("textBox").focus(); Then it worked.
-
1
votes1
answer91
viewsQ: Focus() net Asp method
I have a page with several controls, when I trigger an event from a button I want the focus to go to a textbox that is below the page, but this is not happening simply by putting the method focus()…
-
6
votes1
answer527
views -
0
votes2
answers191
viewsQ: problem with style sheet on Asp net
I use visual studio 2012. I’m working with Asp net. I have a style sheet inside a folder and reference it on an aspx page. When I create a new html tag, a <h3> for example, and I make simple…
-
1
votes1
answer505
viewsQ: Regular Expression Regex
I want to make patterns that way: [a-z]+[acentos] || [a-z]+[acentos]+[espaço]+[a-z]+[acentos] || [a-z]+[acentos]+[-]+[a-z]+[acentos] In order to be able to register a word, it is necessary to be…
-
1
votes1
answer388
viewsA: Procedure does not return the select data
I discovered the problem. It was time to pass the parameter in select, the correct is so: select * from Produto where nome like @teste+'%'
sql-serveranswered HeyJoe 819 -
1
votes1
answer388
viewsQ: Procedure does not return the select data
I created a simple process, it takes a parameter and should return the data according to this parameter: CREATE PROCEDURE [dbo].[testeLike] -- Add the parameters for the stored procedure here @teste…
sql-serverasked HeyJoe 819 -
8
votes4
answers15280
viewsQ: Can you create an array in SQL Server?
In SQL Server Management Studio 2012 you have the possibility to create an array in a trial? I did a google search and did not find, apparently it is used such a table variable to store more than…
sql-serverasked HeyJoe 819 -
0
votes1
answer156
viewsA: SQL Server 2012 Installation Error
I found the solution in this video: https://www.youtube.com/watch?v=-a0k1cgU3x0 footsteps: execute cmd as administrator; type or copy and paste into cmd: fsutil Resource setautoreset true c:\ only…
sql-server-2012answered HeyJoe 819 -
1
votes1
answer156
viewsQ: SQL Server 2012 Installation Error
I formatted the note and installed windows 10, I went to install SQL Server 2012 that always used, but this time did not work. See the error: Have solution? The error is known as 1935.…
sql-server-2012asked HeyJoe 819 -
0
votes1
answer372
viewsQ: Aspnet change textbox characteristics dynamically
For testing I created a button which calls a function in javascript through onclick(). In this function I would like to change for example the border color of the textbox, even better would change…
-
1
votes2
answers556
viewsQ: Sql server - default
Good evening, I created a table to test the sql server default: I did a select to see if the default values were entered but you can see in the image that this did not occur. When does it enter…