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

how to call tvp from ExecuteFuntion.

hi , is it the right wayDataTable ActivityRoutineParameter = new DataTable(); ActivityRoutineParameter.Columns.Add("p1", typeof(long)); ActivityRoutineParameter.Columns.Add("p2", typeof(long));...

View Article


I want to call TVF from entityframwork

hi,the code given in msdn uses ado.net that is sqlcommand. i want to call a sp having tvf using context of entitiyframworkin entityframwork also there are manyways like entityfunction , sqlquery...

View Article


Lambda Expression Breaks if Values are Null

I have a nullable field in a database that is populated if users enter an optional value. In this case it is for keywords which used to be required whenever a user created a post, but to make things...

View Article

Database values reverted to their defaults when updating the database

Ecommerce web site, written using ASP.NET Core 3.1, Razor pages, EF 3.1.8 code first.I have a model called Global. When I first set this up, I included the default values for four properties (others...

View Article

Generating dynamic HTML tables using StoredProcedures

I'm working on a reporting feature that outputs to HTML tables in Razor pages.  The reports have a lot of similar fields (i.e. FirstName) and I'd like to apply the DRY Principal as much as possible...

View Article


Can we use "dotnet ef database update" on published version?

I have created a web application using ASP.Net Core 3.1, entity frame work core, code-first, on VS-2019. I used the following code in my windows 10 shell (CMD)  to make it published and ready to be...

View Article

Image may be NSFW.
Clik here to view.

Nhibernate linq null reference

The below statement is throwing null reference exception, as some of the values EducationalResourceForProblemID are null.How do we check to make sure we execute the statement only when it is not...

View Article

EF Core - .Include()

Trying to get my head around EF Core.I have an existing db and used this to generate the EfModel. I can get the list of Transactions to display in a Blazor Server app.There is a Transactions table and...

View Article


ASP.NET and Oracle Database 11g

Hi,I am using oracle database 11g as back end and vb.net using as front end in my web based application framework version 4.0.I have created a function in Oracle which used to return a RefCursor and I...

View Article


NET5 Swagger WebAPI reveals problem "unable to determine the relationship...

My first baby steps with Swagger against a mature SQL Express database reveals the issue below.Not sure if this is a EFCore issue or a Swagger issue.When I was scaffolding this db there were no error...

View Article

EF Core - select MAX with subquery

Hello,I'm trying to "translate" in EF core this SQL query:SELECT * FROM Estrazioni WHERE Estrazioni.DataEstrazione = (SELECT MAX(maxEstrazione.DataEstrazione) FROM Estrazioni AS maxEstrazione)I have...

View Article

Create database context from cookie and base path

Postgres database has multiple schemes like  company1, company2, ... companyNBrowser sends cookie containing scheme name . Data access operations should occur in this scheme. Web application user can...

View Article

EF Core - conditionally use .Include

Hi,I need conditionally use .Include,tried something like that: var res = db.HT_REZ.AsQueryable();            if (condition) {                res = res.Include(r => r.CF)...

View Article


Using columns not defined in model with Entity Framework Core in ASP.NET Core 5

ASP .NET Core MVC 5 application runs in different Postgres databases.Table names are same in all databases. Base column names and types are same in all databases.Tables can also contain additional...

View Article

getting a single value from entity framework core stored procedure

Hello All,I am trying to call a stored procedure using entity framework core. The stored procedure is little bit complicated so I am not using LINQ. Below is my code: using(IdentityProofContext dc =...

View Article


Updating the existing row in a table with session data

Hello All,I have an entire class object stored in my session. I want to update an existing row in a table with the session data. I am trying to find out if their any better way. In below code, I am...

View Article

Can't configure EntityDataSource under Entity framework version 6

Hi, I have been searching for the answer for this problem more than 2 weeks, I hope anyone could help.I have just start a new project and I did install the Entity framework v6.4.4 to my project. I also...

View Article


Trim trailing spaces from retrieved strings in EF Core

ASP.NET MVC Core 5 application uses Npgsql Entity Framework Core Data Provider to get data from Postgres database using Entity Framework Core. Columns in database are defined as CHAR(n) type, like...

View Article

Output parameter from SP inside async method

Hi,I want to return output parameter for total number of records from stored procedure and call this SP through EF core inside an async method but I am facing issue with out parameter in async method...

View Article

EF Core model customization needed - Microsoft.Data.SqlClient.SqlException...

I have a Client table with 5 foreign keys: OwnerLocation, OwnerBillTo, EnteredByProvider,  sId, gId, bIdSqlServer finds a problem as per the title for bId, and I assume will do the same for sId and...

View Article
Browsing all 1698 articles
Browse latest View live


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