Questions tagged as 'entity-framework'

1
answer

I can not modify table record using EF

I have the following table in SQL, which has those 4 data Through EF I am trying to update the records say ID 3 to be "40" but for more I try the amount always remains at zero This is the code I'm using: /*SE AGREGA SALDO AL SALDO...
asked by 25.08.2018 / 11:52
1
answer

error 'EditItem' is not allowed for this view when applying a filter to a WPF data grid

I see this error in a DataGrid when using a textbox to find a name that shows me what it finds but when clicking on the cell I want to edit that error appears. when loading the window if it works but when using a filter and load the result the r...
asked by 28.06.2018 / 21:05
2
answers

How to call an image from C #, stored in SQL Server. Using Stored Procedure and Entity Framework

I have this code made so far where I apply the SP "InsertEmployee", it adds records to the BD: var Insertar_NuevoEmpleado = _empleados.InsertarEmpleado(txtcedula.Text, txtnombres.Text, txtapellidos.Text, txtcargo.Text, txtdepartamento.Text, Co...
asked by 26.02.2018 / 19:27
2
answers

C # Entity with id Guid does not allow me to register in database

I have modified the question as a result of your requests: first, to clarify that my database was generated using the wizard that Visual Studio has (2015 is the one I use) with the ADO.NET Entity Model (see attached image), in which I designed...
asked by 01.03.2018 / 22:32
1
answer

count records in a table

Good I need to show a count I am working with a listing and lambda as follows: @foreach (var item in Denuncias) { var DenunciaPersona = dbDP.TraerTodo().Where(x => x.NODENUNCIA ==...
asked by 18.12.2017 / 22:31
2
answers

ObjectContext management goblal for EF for a Web Application in .NET

How to emulate a Unit of Work using EF4 for a web project and have a unique ObjectContext to be able to access it globally in the application?     
asked by 28.01.2016 / 00:07
2
answers

When saving multiple photos, I get the error Validation failed for one or more entities. See 'EntityValidationErrors' property for more details

I have a problem saving multiple photos, I get the error Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. I have a modal where I keep multiple photos: tables: PHOTO -NOTICIA_FOTO (inter...
asked by 23.01.2016 / 03:08
2
answers

Error updating

I am working on a windows forms app, Entity Framework, I have an error when doing the Update. public void Update(T entity) { //Context.Set<T>().Attach(entity); Context.Entry(entity).State = EntityState.Modified;...
asked by 06.06.2016 / 17:18
1
answer

Fill textbox with combobox

I'm trying to fill TextBox from a% of ComboBox , my problem is that I show the data of ComboBox and fill the TextBox but when I change the item in ComboBox the data of TextBox remain static. I share th...
asked by 03.12.2018 / 19:20
1
answer

List c # help list distribution

I am new to the list development, I have a query: Assuming I have a list with fields id, name, store, code. and the code is repeated for example 001,002,003,001,001 how to divide the list into 2. one for the repeated codes and another for the no...
asked by 26.11.2018 / 02:51