Questions tagged as 'c#'

1
answer

Replication of database in real time

We have a client that needs to query the database in a short time, something close to 40 thousand requests in less than 2 hours. I created a program that bridges the client's ratchets and our database to validate accesses, but the response ti...
asked by 26.10.2017 / 15:42
1
answer

Declare Relationship Entity Framework one to many

I have two classes: Person public class Pessoa { public int Codigo { get; set; } public string Nome { get; set; } .... public virtual ICollection<Endereco> Endereco { get; set; } } Address public class Endereco {...
asked by 26.10.2017 / 20:05
1
answer

Get information using a dropdownlist as select

I need to make a basic fuel system, where when I select the type of fuel, it brings me the last registered value of that product and automatically selects and automatically inserts the value of the fuel in the TextBox. The supply table is onl...
asked by 10.10.2017 / 21:27
2
answers

How do I compare values between two tables and send email if I have a new value?

My system imports CSV files from multiple directories every day into a table called TB_ARQUIVO. In this file, it contains the name of the Hotel (Column HOTEL_NOME) and four types of Channels ... SEGMENT, ORIGIN, COMMUNICATION and VEHICLE, outsid...
asked by 27.09.2017 / 17:19
1
answer

C # conversion error

I have the most generic class Account and another ContaPoupaça that inherits from this class Conta . In this daughter I have an interface called ITributavel , because this class in addition to the methods and attributes of...
asked by 03.11.2017 / 00:15
1
answer

How to get the encoding type of a file?

Follow the code below: string text = File.ReadAllText($@"{pathname}", Encoding.UTF8); I have several txt files with different conditioning. Because here does not show special characters, because of different encoding. Before running the...
asked by 02.11.2017 / 21:33
1
answer

Error CS0012 The type 'Client' is defined in an assembly that is not referenced

Class manipulation with EF: ContextEF Contexto = new ContextEF(); public List<Cliente> Listar() { //var query = from c in Contexto.Cliente // select c; return Contexto.Cliente.ToList() ; }...
asked by 25.09.2017 / 23:52
2
answers

CPF Mask and Birth Date Asp.net MVC

My question is this: I created a simple CRUD and I am wanting to use masks in the fields of birth date, CPF and telephone. Functioncode%ofCRUD%:@modelWebApplication1.Models.Bdfinal@{ViewBag.Title="Create"; Layout = "~/Views/Shared/_Layout.c...
asked by 09.10.2017 / 03:49
1
answer

Determine the time of execution of the next task based on the end of the current execution in Windows Service application C #

Here's my problem. I have an application as a windows service that needs to be executed 15 seconds after the current execution of the task is finished. The task basically performs operations on the database, and it may take more than 15 secon...
asked by 26.09.2017 / 22:39
2
answers

WCF does not connect to SQLServer when published in IIS

I'm using WCF + SQLServer, when I run it through Visual Studio it works perfectly, when I publish and update in IIS an error occurs:    "A network-related or instance-specific error occurred while   establishing a connection to SQL Server. Th...
asked by 26.09.2017 / 20:26