Problem I would like to put the following design to your consideration. This is the pattern I use to follow […]
Tag: entity-framework
Web API using Repository / UnitOfWork
Problem I’m looking for feedback on a repository I set up based on a blog post I read here. I […]
Select query helper for nolock and no change tracking
Problem I often need to switch connection strings and databases (dev/prod) and I need to be able to execute queries […]
Storing Enum values as Strings in DB
Problem I have a Data First Migration and have been struggling a little with storing an enum value as a […]
Joining tables with EF
Problem Here is my database: Here is my viewModel: public class groupsFoldersViewModel { private DAL.educationSocialNetworkEntities DB = new DAL.educationSocialNetworkEntities(); public […]
Navigation properties with sql/dapper
Problem I want to have the same experiance with slq/dapper for my navigation properties just like in Entity Framework. But […]
Abstract repository for entity framwork
Problem I write abstract repository using System; using System.Collections.Generic; using System.Data; using System.Data.Entity; using System.Linq; using System.Linq.Expressions; namespace Framework.DataLayer { […]
Refactor Oracle Entity Framework lambda query
Problem I had a ugly problem and wrote an ugly query. Query creates a cache that is used to get […]
Cross-Database Query Without Casting to List
Problem I am trying to do a cross-database query without having to enumerate the variable t. public List<Models.MCMessageCenter> GetMsgCtrsWithReloInfoByUserId(Guid userId) […]
Generic repository and unit of work code
Problem I am writing a WPF application that needs to access information from a database (I am currently using Entity […]