Questions tagged as 'c#'

2
answers

Relationship between classes - (C # EntityFramework)

Hello, I have a Person class and an Address Class Ex. public class Pessoa { public int Id { get; set; } public string Nome { get; set; } ... public Endereco Endereco { get; set; } } public class End...
asked by 15.01.2016 / 21:50
1
answer

User registration and password

I have an acceptance problem. After setting the Microsoft.AspNet.WebPages.WebData and the corresponding classes, the system correctly created the tables in the database so that I could implement the code for user registration, password an...
asked by 14.01.2016 / 13:47
1
answer

'System.StackOverflowException' When executing migration with DbMigrator

I have my Migration which has a number close to 6500 records like this: db.MinhaLista.AddOrUpdate(x => x.Codigo, (new MeuModel { Codigo = "ABC1234", Nome = "Teste "})); However while running my migrations as follows: var migration =...
asked by 26.08.2015 / 20:24
2
answers

Compare DayOfWeek in an ASP MVC query

I'm trying to make a query where I check if the week day is the chosen one to create a list of data that loads in a ViewModel. Query: var plan = db.Servicos.Where(s => (TecnicoResp.HasValue ? s.NumTransportado == TecnicoResp.Value...
asked by 18.02.2014 / 17:47
1
answer

Transcribe SELECT for query expression LINQ

How can I reproduce the following query for LINQ expression? SELECT nome_empresa, Count(funcionarios.id_funcionario) AS qtdfuncionario, Count(id_colaborador) AS qtdcolaboradores FROM empresas JOIN func...
asked by 29.07.2015 / 16:08
2
answers

How do I update backgroundWorker.ReportProgress () through a class in another project?

I read a text file that contains data from another database, load that data line by line into a class, edit the required fields, and then save it to the new database. This insert processing follows the following pattern: In View , I...
asked by 05.02.2014 / 10:59
1
answer

Code to generate the user password hash in Oracle 10G with C #?

I need to authenticate users in a WEB application in the Oracle 10g database, but the credentials are native to the database for running an Oracle Forms application, and we would like to keep the same password on both systems (Single Sign-On )....
asked by 05.12.2017 / 04:58
2
answers

May cause cycles or multiple cascaded paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints

I have a class that will have two FKs pointing to the same table, so the Entity Framework returns the error:    Can cause cycles or multiple cascading paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY cons...
asked by 24.05.2017 / 01:48
1
answer

Return Dowload Excel via MVC Controller

I have a method that generates an excel file and writes it to a directory, but then I get the directory path and need to download the excel file, but nothing happens, no error. Can someone help in what I'm failing? [HttpGet] public FileRes...
asked by 29.05.2017 / 20:13
2
answers

Convert binary format string to PDF

I would like to know how to generate a PDF file using a string with binary values, the values should actually turn a text (according to the ASCII table) and be written to PDF. p> I tried to do this but did not succeed: string teste = "0100...
asked by 10.03.2017 / 20:13