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

How to intersect in-memory data with data from database

Hi, I am having a bit of a technical challenge here.I have a list which contains object of type User. IList<User> aUser = GetUser(); // this is a cached dataclass User{string Username;Guid...

View Article


Entity Framework one to many relationship table design help

I am trying to come to grips with using EF6 in my solution. I have done lots of reading and tutorials. Now I'm trying to implement into a real world app that I have. I have the following tables in my...

View Article


Select Distinct MVC Linq

Hello All. I am sure I am overlooking something but...could someone assist please. I am simply trying to select DISTINCT using the following code....and it is returning a all (even duplicates. Thank...

View Article

really confused

I am an old ADO.net programmer and am now porting over my legacy code to entity.I have been stuck now for about a day trying to understand something and not finding much help online so here I amI am...

View Article

call an oracle function from c#

i have a function in oracle with this signaturetest_fun(p_nat_no in number,p_number_type in number) RETURN test_tablein the c# this is the codestringselect="test_fun";using(OracleConnection connection...

View Article


How to update record using Entity Framework?

HII am using generic repository pattern for CRUD operations. I want to update the record and I am using the below code  public interface IRepository<TEntity> : IDisposable { List<TEntity>...

View Article

Stored Procedure parameter and ADO.NET

If you specify the "OUT" or "OUTPUT" keyword for Stored Procedure parameter then parameter will behave as Input Parameter  as well as Output Parameter then What is the use of...

View Article

Stored Procedure Parameter and SqlParameterDirection.Output enum member

If you specify the "OUT" or "OUTPUT" keyword for Stored Procedure parameter then parameter will behave as Input Parameter  as well as Output Parameter then What is the use of...

View Article


Call stored procedures with Entity Framework 6 code first approach in Asp.Net...

We are using Ado.Net for working with the database from our C# code in Asp.Net MVC. I want to work with Entity Framework, so I need to use stored procedures with it, call SP with EF. There are few...

View Article


linq statement for filtering Enumeration by List of strings

Hello,I have a DbSet of BowtieDMEquipmentLookups. A BowtieDMEquipmentLookup is defined as follows:public partial class BowtieDMEquipmentLookup { public int BowtieDMEquipmentLookupId { get; set; }...

View Article

Inheritance In Code First Approach

Suppose I am implementing the Repository and Unit Of Work Pattern in my project so that I can unit test my methods. The following are folders of interest inside the project folder// Core - contains...

View Article

divide DataTable based on number of rows

I am trying to divide DataTable on the bases of rows. I have dataTable that get all the rows from DataBase. But i want to divide this datatable for example :if i get 100000 rows count from Database. So...

View Article

Having an issue with linq order by with a custom comparer not finishing.

The comparer gets called over and over and never finishes when I call orderProb().ToList().  Am I doing something wrong?public class PreferredAddressComparer : IComparer<AddressTest> { public int...

View Article


AddRange RemoveRange Methods Missing

Hi,I created a project in Visual Studio 2012 and installed EF 6.1.3 in it.  I'm trying to use the AddRange() and RemoveRange() methods of the DbSet class but it appears they are missing.I have already...

View Article

Image may be NSFW.
Clik here to view.

DbContext.Set() and DbContext.Set() returns different object

HI,With a surprise I have found this. See the attached screen shots. I have a DbContext object "db" and I tried both the options and the result is surprising to me.DbContext.Set() and...

View Article


Connection String Error

HelloAm using Entity Framework for application. the problem is that I am using Entity Framework to perform action with my database , which is working fine. but for some other reason i  need to perform...

View Article

object_id from sys.Tables is this a rock solid number?

need a way to reference tables and found the object_id from sys.tablesWondering under what scenario I would lose that number?would that number come with the schema?

View Article


Execute scalar

I'm trying to use this code but don't understand what ExecuteScalar does despite googling.userId is returned from a stored procedure. Could someone please clarify?Protected Sub ValidateUser(sender As...

View Article

Help with writing 3 Linq statements....

I need a linq statement that returns the two tables together byUser_IDI need a linq statement that returns all user in apples groupI need a linq statement that returns all rows from Groups table that...

View Article

LINQ Query string.join

Hi,I have a list having the bellow.ID    Flag1   Flag2   Flag3--------------------------1      Y         N       N2      Y         Y       N3      Y        Y       Yand I want the result which will be...

View Article
Browsing all 1698 articles
Browse latest View live


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