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

Difference between Relational Model and Objected Oriented Model

can you please explain the difference between Relational and Object Oriented Model. Any good links to read?

View Article


ps1 cannot be loaded software restriction policies

I am getting the below for entity framework 6.1.3 for .net framework 4.5 in vs 2015 Tried the following1. I am using Windows 10-home edition. used gpedit and added the unrestricted to init file path in...

View Article


not allow delete in linq to sql classes

HII create a Linq to Sql Classes with relationship between tables and then I use delete linq to delete a parent_id but it don't show error when the child_id is exist. I want it show error when delete...

View Article

Image may be NSFW.
Clik here to view.

POCO with protected/private collection and EF6

Let's say I have this POCO: public class Shelf : Entity //Entity is a base-class that holds the ID-property and related things { public string Name { get; private set; } private ICollection<Book>...

View Article

How to bulk insert datas into Mysql in asp.net core?

just like the title, who can give me some useful samples or links? I used the code as below, but it was so slowly.  I don't think the "AddRange" method is an efficient "bulk operation"!!Code: [HttpGet]...

View Article


Audit Trail in Entity Framework 6.1.3?

Hi I am using generic repository pattern for CRUD operations. I want to audit trail when User modify record. I want to log modified property name, current value and new value. How to log this using EF...

View Article

Entity Framework with multiple assemblies and multiple contexts

I have ASP.NET application, which uses several assemblies. Every assembly has own DbContext:Assembly1.dll - DbContext1 - Configuration1Assembly2.dll - DbContext2 - Configuration2Assembly3.dll -...

View Article

LINQ convert to datetime in a query

I have the linq query below binding to a Gridview:gvEvents.DataSource = dc.demand.Select(s => new { id = s.id, user = s.user.name, protocol = s.events.protocol, type_demand = s.type_demand,...

View Article


Simple Linq statement not working Error.

Hello All. Just need an extra set of eyes please. I have simple 3 cascading dropdowns for State, County, City. Please take a look and let me know if you see where this error is coming from because I...

View Article


First Time with EF and MySQL - Can get it to work

I am very new to EF and I am trying to get it working with mysql, mainly just so I can start to see how it works. I am thinking of replacing my old DAL code with it.Because I am not sure how it works,...

View Article

Code First Entity : The property is part of the object's key information and...

Though I am not trying to update primary key, I am getting this error message when I try to update Title field:The property 'ProposalId' is part of the object's key information and cannot be...

View Article

enable migration problem

Hi, I am not sure where to post this but will try here. I am really new at MVC and Entity Framework and have been following a book published by  Apress titledASP.NET MVC with Entity Framework and CSS I...

View Article

group by year

I have in my database  table (News) a field type date.I want to sort the news by year.That is to display the news sorted descending and grouped by year only.can anyone help me achieve this please.

View Article


How to create IsIdentity field using Entity framework

Hi   How to create IsIdentity field using Entity frameworkThanks

View Article

Image may be NSFW.
Clik here to view.

What is independent association actually doing here? What is its purpose?

Hi guys, I have been desperately trying to get my head around independent and FK associations. I have 2 models connected up with EF (I've left out few non-relevant properties): public class Item {...

View Article


Why do Database Generated Values create columns when their values are always...

Hi, I have a model and one of the properties is a calculation based on another property (average age).Below is just pseudo code and I have not tested it. public class Person{ public int Id { get; set;...

View Article

Problem getting right value back from stored proc in LinqToSQL

At this point I am not sure whether I have a stored proc problem or a  LinqToSQL problem.  I have a Web app with a LinqToSql dbml that is calling a stored proc.  The purpose of the proc is to return a...

View Article


How to store and show date time as per user timezone

suppose user posting some issue in a forum and forum store those data in db with posting date and time. after posting issue by user A then posting date and time is showing in listing page. suppose web...

View Article

EF cannot make up it mind on string formatting

"Charge" is type money"creditcared" is also the same typetxn.Transaction.creditcard.ToString()  compiler is happytxn.Transaction.Charge.ToString() compliler complains about "no overload for method...

View Article

Entity Framework Query where value is Null

Hello,I am connecting to an Oracle Database, I am having difficulties with queries where the value being filtered IS NULL.Typically in Oracle, it would be written as...select * from table where...

View Article
Browsing all 1698 articles
Browse latest View live


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