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

Sql DataReader

Hi Friends,I have the below code where I am using a connection, sqlcommand, and sqldatareader to retrieve records from SQL Server. My question is I want to use the sqldatareader to loop through the...

View Article


Adding New Field With Code First Approach on Production Environment

Hi guys,I would like to add a new field to an existing table. I can do add migration and update database commands on thedevelopment environment. I wonder how can I update the production database?Best...

View Article


Linq query to database - Join

Hello,I have question for you. I have 2 table, and one of them consist column for example "Operation" , and second table has columns with Name and Description. Now, I want to select all columns from...

View Article

how to delete duplicated records in sqlserver

Greetings to all Dear friends, I need to delete the records in the database table that have a specific duplicate field, but I don't know how to write the appropriate query for this operation. Please...

View Article

problem with the entity

Hi,I'm trying to learn blazor from online tutorials and now I encounter a problem:When I write this entity I see a red line under both "options".using System; using System.Collections.Generic; using...

View Article


Working with EF Core

I want to retrieve a subset of records from a table in an asp.net core app I'm building. Being old school I like to use stored procedures in Sql Server and in this instance the sp I've created uses...

View Article

.Net Core migration keeps failing.

I cannot complete the following migration is their some reasoning behind the below error!<div>PS C:\Users\Andrew\code\Bakery\wwwroot> dotnet ef migrations add CreateDatabase --output-dir...

View Article

Adding a new Context

I have a website Portal where there is one SPA application that I built in VS 2017 EF 6.0 Code First, Web API etc with a HTML/JavaScript front-end. I plan to add another independent application to the...

View Article


Build failed error!

At what level of this project should i be trying to install this migration?  I want to install initial migrations to build my database form db context. Was having issues at first about update to ef...

View Article


'NavigationExpandingExpressionVisitor query in ef core 3.1 error

Hello , i have a query that was working fine in ef core 2.2 but after changing to 3.1 and the changes i cant find the best way (or any way) to write this without getting this Error :...

View Article

Model navigation property returns null value in my asp.net core project.

HiI have some entities like Patients with some relations to another entities. My problem is that, in Details view, the navigation properties (which points to other tables) does not display anything!...

View Article

Changing enum values to database

If i have a table with an enum column and then later i change the values in this enum, do i need to create a new migration and/or update database?I have this enum for a property in my model:public enum...

View Article

I Can't create a migration identity

Hi,I have a solution with some project (Api, Entities, Client, IdentityServer, ...)I Create a migration in IdentityServer project for db of idetityserver so far so good. I try to create a migration...

View Article


Header Column

HI ALL,I have problem with Header Column from Excel file.It become trouble with dot "."In excel Header column is "P 213.67(cps) and to load to webpages in controller as bellow;controller foreach...

View Article

TransactionScope or EF Core Database.BeginTransactionAsync ()?

I know of two ways to start transactions in ASP.NET Core - the System.Transactions.TransactionScope class and the second method ( if you work with EF Core ) for the DbContext class of the Database...

View Article


what is the order of exeution in linq.

like in sqlserver we have following order of execution.SELECT ORDERFROMONJOINWHEREGROUP BYWITH CUBE or WITH ROLLUPHAVINGSELECTDISTINCTORDER BYTOPcan i get the same msdn page where they have written the...

View Article

Image may be NSFW.
Clik here to view.

VS 2019 - DBML File

I have downloaded a DBML file checked in by my colleague from TFS (VSTS Online). The entire project compiles. Once I make any minor change to the file, it prompts for changing the connection string. I...

View Article


DataSet does not support System.Nullable.

Hello,I am new to MVC and need help,I have got the above error when using crystal reports.I have created a button on which the report should be download but I got this error on-click.Please let me know...

View Article

Suggestions needed

Hi guys,I have a database table that has two columns, gamecode, and clientcode. (https://ibb.co/3mzdrgZ)  At the beginning they were unique. I was querying as follows;var productCodeReverse =...

View Article

How can i check fo nulls in a Linq expression

I have the following :if (user.Any(x => Guid.Parse(x.Id) == group.Id))The issue is if x.id is null it fails . How can i do a check to only do the check if x.id is not null otherwise ignore ?thanks

View Article
Browsing all 1698 articles
Browse latest View live


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