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

Facing Issue with Entity Framework Code First Approach Stored Procedure mapping

Hi,I'm calling a stored procedure in entity framework code first approach. Basically I have four columns for my table but using stored procedure I'm only returning two columns. As, im returning only...

View Article


Difference between Linq order by & Linq Sort

Hi All,Can anyone let me know what difference between Linq order by & Linq Sort and why we used it.Below is example for Orderby but how we can use the Sort static void Main(string[] args) {...

View Article


Image may be NSFW.
Clik here to view.

Inconsistent accessibility [HELP]

Hello! I have several errors and I want someone who can help me :D 

View Article

ProxyCreationEnabled in Entity framework

HiI read about ProxyCreationEnabled in the link.. https://stackoverflow.com/questions/4596371/what-are-the-downsides-to-turning-off-proxycreationenabled-for-ctp5-of-ef-code-fI Know that it create...

View Article

Linq GroupBy samples

Hi Everyone,Can anyone send me the example of GroupBy using LINQ.  Few samples would be fine to understand the groupby concept using LinqMany Thanks,Shabbir

View Article


How to set up a relation between a property and a collection in the same entity?

My idea is to upload all files in one table and store their Ids in the related tables. for example,public class ApplicationUser : IdentityUser { [Required, StringLength (50)] [Display (Name = "First...

View Article

Linq query returns only the first sequence in a list in C#

Hi,Could anyone please tell me whats wrong with the below Linq query? It iterate only first sequence 3 times based on CatNo 1. Means, CategoryNoList is 1,2,3, the query returns 3 same rows where CatNo...

View Article

passing null datetime into sproc

i have a sproc with 2 datetime parameters that are nullable.   I have a C# method to call that sproc and get the results.  It works fine when running it in SQL server.   When I run it in the page, I...

View Article


Retrieve multiple values using join in LINQ

I have a problem with the following query as I want to get the record from multiple tables where PostId is same for this purpose I use join and this works perfectly but the problem is in PostMeta table...

View Article


LINQ and Recursive CTE and Windows Functions

Hi Friends,I was wondering can I write a recursive CTE or a Windows function using LINQ. Also can I write T SQL in .Net Core 2.1? Thanks !!!

View Article

Convert SQL Statement to LINQ...

How do I convert SQL Statement to C# LINQ?SELECT  TOP 10 * FROM TABLENAME WHERE CAST(CREATED, AS DATE) = CAST(GETDATE() AS DATE)Please help me convert the above code to C# LINQ code ~ thank you

View Article

Can't migrate Entity Framework

HiI run this command on package manager console :pm>add-migration FirstAppDemobut keeping get this image:The project first app demo failed to build.What should I do?please inform.regardsSaeed

View Article

Error - No Data Exists for the row/column

Hi  I have below code . I want Data to be read from second row.void Uploadin() { OleDbConnection connection = new OleDbConnection(); try { string path = Server.MapPath("~") + "/UpLoad/Data.xls"; string...

View Article


Adding EF to Existing Project wiht Existing Database

Hello everyone and thanks for the help in advance.  I am starting to lean EF and have an existing project with models already designed.  I also have the database completed.  Both were done manually...

View Article

File Extension

Hi  How to get file extension . I want if it is .xls then constring should be @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Excel...

View Article


Error

Hi  I am importing Data from excel . ON some field it is giving below errorThe given value of type Double from the data source cannot be converted to type date of the specified target columnI am...

View Article

Error - No Data Exists for the row/column

Hi  ON below line i get above errorstring m_DocNo = dr[0].ToString();void Upload_InternetData() { OleDbConnection connection = new OleDbConnection(); try { string path = Server.MapPath("~") +...

View Article


Performance problem - Critical points in the system.

I discovered that in the visual studio tool, has Analyze, which shows the critical points in the code, and it was verified that the time consumption is in those queries referring to the dll of the code...

View Article

MVC application creating a new table in existing database instead of updating...

Kris van der Mast: I updated the connection string as it contained both username and password. Please don't put such information on a public forum.I am creating an MVC application where I need to...

View Article

Excel Sheet

Hi  I have below line . I want that it should read default Sheet1 OleDbCommand command = new OleDbCommand("select * from [Data$]", connection);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>