Questions tagged as 'entity-framework-6'

1
answer

Raw Entity Framework

I'm trying to call a SQL Server query from Raw var result = context.Database.SqlQuery<UniversalExtend>("SELECT distinct(PC.ProductoCatalogoId)," + " P.Nombre + ' ' + PL....
asked by 09.10.2018 / 08:06
0
answers

The number of properties in the Dependent and Principal Roles in a relationship constraint must be identical

I have 3 classes that I want to relate from many to many with EF and we have this: public class ClsPermisos: ComponenteBase { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public Byte Codigo...
asked by 17.06.2018 / 15:07
0
answers

I can not update a database of an Entity Framework (ado element)

How I have this project, where in the database in a table modify something, then I want to update the visual study model. But I get this error when I give update model from the database: "An unexpected exception occurred when generating th...
asked by 30.05.2018 / 19:25
0
answers

Pass Entity List in a WCF WebService

Today I get an error when consuming a web service wcf, the error is as follows:    The service could not be invoked. Possible causes: the service is offline or inaccessible. the client configuration does not match the proxy; The existing prox...
asked by 23.05.2018 / 06:35
1
answer

Use an SQL Query as the source of a Model in the Entity Framework

Good morning! I comment, I'm having the need to add a Model in EF, but with the peculiarity that you use a Query SQL as a source of information instead of a table. I tried to do it by the normal ways in the following way [Table("[dbo]....
asked by 09.04.2018 / 14:39
0
answers

Functions / Stored Procedures PostgreSQL Entity Framework

I'm doing a WebAPI project with Postresql, and integrate the tables and the connection works fine, but when doing functions in postgres and wanting to import them I get the following error:    Error 6046: Unable to generate function import re...
asked by 21.03.2018 / 19:04
1
answer

QUERY: Error making the Update-Database due to problems with foreign keys

Good day, afternoon or evening, I'm doing a small test project by taking an inventory. I'm working on C # ASP.Net Core 2.0 I have the following classes: Inventory customers Suppliers Sales Products I did the Update-Database and everything wen...
asked by 07.03.2018 / 16:37
1
answer

Loop referring to objects in entity framework

I have a relationship that goes like this: A sale has a business (the business where the sale was made) Then I have the business entity by itself, it is not related to sales. Now, I made a change in the project, and I have to list the Busi...
asked by 01.02.2018 / 14:01
0
answers

Insert data in bd from web api?

I'm having a couple of problems with an API in ASP.Net, I try to save data like this: public HttpResponseMessage PostExpediente([FromBody] ExpedienteDto expedientePOCO) { Ejercicio2Entities context = new Ejercicio2Entities();...
asked by 31.01.2018 / 18:32
2
answers

Save Header Detail EntityFramework

I am developing an application where I need to keep an invoice, where the client and the detail of said invoice, here the code: using(Context context = new Context()) { Cliente cliente; if (clienteActual != consumidorFinal) {...
asked by 05.01.2018 / 05:15