Questions tagged as 'entity-framework'

2
answers

EntityFramework StoredProcedure retrieve parameter output

How to retrieve the Output parameter of a storedProcedure? SP Example: create PROCEDURE StoreProcedure_Name @ParametterWithNummvalue varchar(50) = null, @In_Parameter varchar(50), @Out_Parameter varchar(10) out AS set...
asked by 29.03.2016 / 03:47
1
answer

Insert via EntityFramework "IDENTITY_INSERT is set to OFF" error

I have several models and for some reason one of them has the following error: Cannot insert explicit value for identity column in table 'tbl_boleto' when IDENTITY_INSERT is set to OFF. I remember that I have already entered a record, but...
asked by 03.03.2016 / 13:17
1
answer

Argument data type xml is invalid for argument 1 of len function

I'm mapping a property to the xml-type database using Migrations . public string Xml { get; set; } this.Property(t => t.Xml).HasColumnName("Xml").HasColumnType("xml"); However, querying the class using Linq returns the error. _...
asked by 23.02.2016 / 14:59
1
answer

Filter results on a bank level Entity Framework

I have the following question about using the Entity Framework. I have an abstract class for the class that communicates with the base. Aiming for the performance I want instead of bringing all records from a table to after filtering, I want...
asked by 14.03.2016 / 12:18
1
answer

Change ConnectionString only in runtime memory

In the App.config of my application I encrypted the ConnectionString, I now need to decrypt in runtime but not updating in the App.config file. I am using the following code, but the same ends up changing in the file losing the logic of I lea...
asked by 29.05.2016 / 23:26
2
answers

How to use my Firebird database already populated for a web project in Visual Studio 2015 using entity framework?

I have a Firebird database already populated and I would like to use this same base for a web project in visual studio 2015. I installed Firebird ADO.NET Data Provider and tried to give a "connect to database" in visual studio, I selected "Fi...
asked by 26.01.2016 / 14:42
1
answer

How to do Reverse engineering via EntityFramework using a Firebird data source in VisualStudio 2015?

I have a Firebird database already populated and I would like to use this same base for a web project in visual studio 2015. I would like to use a class library and generate the template using EF Code-First - Starting from an existing databas...
asked by 26.01.2016 / 20:35
1
answer

How to write data in a one-to-many table?

I have a question that still persists after doing some searches. It is as follows, assuming I have a form, where I register multiple emails for a single user, how do I record these multiple emails in their table? Here are the examples: (if y...
asked by 10.11.2015 / 13:35
1
answer

Entity Framework + Fluent API + Web API?

I'm having trouble mapping the category within a product, when I'm ready the products the category ( virtual class ) comes empty, even with CategoryId filled. Product public class Product { public Product() { th...
asked by 29.10.2015 / 21:33
1
answer

Uploading an entity Country related to State

I'm starting in the Entity Framework and when trying to load an entity state, the relational parent entity is coming with null value, what could I adjust in my code to solve? Class Status: public class Estado { ... public int Id { g...
asked by 14.01.2016 / 20:25