Questions tagged as 'entity-framework'

0
answers

Update a record in the database with ajax?

What I'm looking for is updating a database record by recommending a more experienced programmer who told me that he would use POST to structure the following code. <script> $("#txtHoraSalida").val(hs); $("#txtGafete").ke...
asked by 07.04.2018 / 18:16
0
answers

Query Entity Framework c # with two types of data

I want to know if I have these two values in my table for verification the data type I get error using (RARGEntities datosEntity = new RARGEntities()) { RegistroDatos datos = datosEntity.RegistroDatos.Where(x => x.CodPersona == CodP...
asked by 16.03.2018 / 15:15
2
answers

Delete table record with composite key

I'm starting to use EntityFramework and MVC in C # .NET, and I have a problem trying to delete a record from a table that uses a composite key. Driver: // GET: DocenteCursoes/Delete/5 public ActionResult Delete(string curso, string do...
asked by 13.03.2018 / 21:18
1
answer

PegedList with more than one class

I have three tables mapped with the Entity Framework: teachers, classes, and enrollments. I need to show some fields of the teachers and some fields of the classes and show the result in a view using a PagedList if I put it in the following way...
asked by 04.03.2018 / 23:26
1
answer

EF Core Generic Repository error with GetById method

I have a generic repository for my crud in netcore, but I have a problem with one of the methods. The method is GetById public async Task<TEntity> GetById(int id) { return await _dbContext.Set<TEntity>()...
asked by 07.02.2018 / 15:31
0
answers

Oracle Entity Framework problems with operator like

In one of our projects with ASP.net MVC, Oracle and Telerik Kendo we have a problem with searches since they are differentiating between uppercase, lowercase and accents. We create a trigger in the DB so that after the start of stable session...
asked by 12.02.2018 / 21:38
3
answers

Like: validate through textBox the existence of a record in the database. C #

I would like to know: How to validate from a textBox the existence of a record stored in the database? That is, write in the textBox the name of the record and when you press the "Search" button, I get a message that tells me that the reco...
asked by 08.02.2018 / 16:04
1
answer

I have a problem when making a record with c # and entity framework

I get a dialogue but I do not know what it means ... when loading the data I do it in the following way: var listaRed = con.Registros.ToList(); if (listaRed.Count > 0) { cbSelecNombreRed.DataSource...
asked by 02.01.2018 / 02:26
2
answers

Fill datagridview with condition # Sql

Good friends. I am creating a project and I just ran into something that I can not solve. I have a datagridview where I show all the information of an employee: private void Mostrar(){ var query = from p in db.Usuarios_...
asked by 08.12.2017 / 06:46
1
answer

The specified cast from a materialized "System.Int32" type to the "System.String" type is not valid

This happens to me only in production, not in local environments    can not set the 'Type' property (which is int) to a 'string' value       The specified cast from a materialized "System.Int32" type to the   "System.String" type is not vali...
asked by 28.12.2017 / 15:12