Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Browsing all 1698 articles
Browse latest View live

It's 2021, why would you use ADO.NET and Dapper (SQLish styles)  over  EF ?

So, we are well into 2021 and I am curious to see in what scenarios you would prefer to use ADO.NET and Dapper (SQLish styles)  over  EF. Short case scenario description will be highly...

View Article


Is EF STILL slower than ADO.NET and DAPPER ?

Hello. Anyone done any benchmarking recently, is EF Core STILL slower than ADO.NET and DAPPER like the analysis done in this article ?  Dapper vs Entity Framework vs ADO.NET Performance Benchmarking...

View Article


Razor pages and database with a specific schema

Hi, I'm building an application for already existing DB. Within a DB there are several schemas eg:dbo Production, Purchasing, ... I don't have any problems to work with dbo schema, because there is no...

View Article

Azure Web Job Template in VS2019

Is it possible to add a LINQ2SQL class (DBML) to an Azure Web Job project template? I have been trying this for a couple of hours with zero luck. I am able to add this to a console application or a...

View Article

Getting data from Stored procedure that returns multiple result sets using...

I am rebuilding a project in MVC using Entity Framework, which was originally built using web forms. One of the pages needs 'Employee Details' that are spread over 5 sub tables that a stored procedure...

View Article


JSON_Value error: The argument 2 of the “JSON_VALUE or JSON_QUERY” must be a...

Hello,I'm seeing this error when running the code on SQL 2016. On SQL 2017 it works fine. Argument 2 of the "JSON_VALUE or JSON_QUERY" must be a string literal.I updated the 2nd argument to a string...

View Article

Linq FromSqlRaw - Data is Null. - Comments Field Varchar Null

Hi All,I got this;var result = _context.Set<spCallResult>().FromSqlRaw("exec [dbo].[spCallVal] @XX={0}", xx).ToList();System.Data.SqlTypes.SqlNullValueException: 'Data is Null. This method or...

View Article

how to calculate time taken by cmd.ExecuteReader.

hi, I have sqlserver 2019 and asp.net  2019 and iis 7 on the same machine.    What I have noticed is a stored procedure takes 19  second from  query window of sqlserver,when I run it first time. second...

View Article


adding additional fields to EF dataset in View and submitting

I am new to MVC, EF. My MVC project has a view that displays data that I get via EF. So, that model subset is already created. But after the user sees this form, I need to add an additional field...

View Article


Using EF Core entity if child view also exists throws error

ASP.NET 5 MVC Shopping cart application uses EF Core with Npgsql data provider. Database contains products table create table Product ( Product char(20) primary key; Description char(50); ) It is...

View Article

Linq - does not contain a definition for 'Contains'

I have an array of ServiceGrid items called services, the relevant properties are shown below:svcId / svcName / svcBillingRate 5 / serviceA / 10.00 19 / serviceB / 19.25 11 / serviceC / 24.00 17 /...

View Article

How to use async scaffold and compile

ASP.NET 5 MVC Core application uses EF Core Npgsql runtime scaffold and Roslyn compile to different versions of EF Code DbContext assembly.It takes 12 seconds to scaffold database. So async operations...

View Article

Member AutoSync failure from LINQ

My application generated the following error message recentlySystem.InvalidOperationException: Member AutoSync failure. For members to be Auto-Synced after insert, the type must either have an...

View Article


issues in defining relationship between entities in EntityFramework core code...

Hi Aall,I am completely new to Entity framework, working on sample app.Following the .entity framework CodeFirst approach for  asp.net  core web apiwe created two entities public class Account { public...

View Article

Sorting SQL Adapter

Hi,I have this SQL adapter taking an id from a previous page but i want to be able to sort it by the Year field any ideas?New SqlDataAdapter("SELECT Artist_Code, Artist, Title, Album_Code, Year, Tracks...

View Article


EF Core - Data lost when unit testing with in-memory database, but works fine...

I have some code that saves a Term (as in an investor, who invests in property for a fixed term). Each term has an associated collection of shares, one for each property...publicclassTerm {publicTerm()...

View Article

EF Core NotSupportedException The property does not have a value set and no...

UPDATE: Could not figure out how the autoincrement of decimal works for Unit Testing. The workaround is [TestMethod]public void Add(){  MyEntityRepository = new MyEntityRepository...

View Article


Convert linq to sql query

Hi , I struggle to convert a query from linq to sql ,my query is: from box in _context.MailIteboxStore.Where(x => x.boxId == boxId) .Include(x => x.boxItem).ThenInclude(x => x.boxItemGen)...

View Article

The instance of entity type cannot be tracked because another instance with...

The instance of entity type 'Table' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity...

View Article

EF Core, first query is slow, how to generate a precompile view to improve...

Hi,I am working on webapi 3.1 with entityframework core 3.16. I got about 180 entity that is slow with the first query. I read that precompiled entityframework view can help improve performance. I...

View Article
Browsing all 1698 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>