A LINQ extension method to calculate a running total - blog.dee4star.com The other day I needed to calculate a running balance based on a series of either debit or credit transactions. So each line item contains a balance column that is the carried forward balance plus the sum of debits and credits up until the current line item. After some playing around I came up with a simple LINQ expression to do the job. It is also a nice illustration of how LINQ expression trees enable you to create more elegant solutions. A LINQ extension method to calculate a running total - blog.dee4star.com
Rollup Extension Method: Create Running Totals using LINQ to Objects - Eric White's Blog Rollup Extension Method: Create Running Totals using LINQ to Objects - Eric White's Blog [Blog Map] This blog is inactive. New blog: EricWhite.com/blog Recently, I had need for a new extension method for IEnumerable<T>, which I call "Rollup". This extension method is sort of a cross between the Select and Aggregate extension methods.
Posted By : Shailendra Chauhan, 18 Oct 2012 Updated On : 25 Nov 2013 Keywords : linq join on multiple conditions,c# join example, linq inner join with multiple conditions, linq left outer join, linq left join, linq cross join, linq right join, linq group join SQL Joins with C# LINQ SQL Joins with C# LINQ
SQL Joins with C# LINQ
There are two flavors of serialization you can use on Framework entities: good ol' XML serialization and the DataContract serialization. XML serialization is pretty straightforward - it serializes the object it's given. But it does not walk references (I'm talking foreign keys here) or collections. whereas the DataContract serializer does handle the references and keeps track of what objects have been serialized and what hasn't. If you're going to use XSLT on the serialization, I'm not sure at this point which one is better - they're probably equal but time will tell. entity framework | RiggsHill Software entity framework | RiggsHill Software
MainModule.vb
Public Interface IDocumentService <OperationContract()> Sub SaveDocument(documentInfo As DocumentInfo) <OperationContract()> Function GetDocumentKeysByFullText(searchCondition As String) As List(Of DocumentKeys) Managing BLOBs using SQL Server FileStream via EF and WCF streaming | Peter Meinl: Software Development Tips Managing BLOBs using SQL Server FileStream via EF and WCF streaming | Peter Meinl: Software Development Tips
EF Code First Extras EF Code First Extras CodePlexProject Hosting for Open Source Software EF Code First Extras This project contains a variety of extensions for Entity Framework Code First, such as migrations and pluggable conventions.You can use conventions out of the box. You can now find it on NuGet.
Tracing and Caching for Entity Framework available on MSDN Code Gallery - Jaroslaw Kowalski Tracing and Caching for Entity Framework available on MSDN Code Gallery - Jaroslaw Kowalski We have just released a sample that shows how to extend Entity Framework in interesting ways by plugging into ADO.NET provider interface. The sample provides two extensions: EFTracingProvider – which adds the ability to log all SQL commands that are executed (similar to LINQ to SQL’s DataContext.LogEFCachingProvider – which adds transparent query results cache to EF The sample comes with implementation of distributed cache which uses Velocity CTP 3 as well as an adapter for ASP.NET and simple in-memory cache implementation. Because the sample is quite large and uses many advanced techniques, it’s impossible to fully explain it all in one blog post.
Tip 14 - How to cache Entity Framework Reference Data - Meta-Me Scenario: In order to make applications perform it makes a lot of sense to cache commonly used reference data. Good examples of reference data include things like States, Countries, Departments etc. Tip 14 - How to cache Entity Framework Reference Data - Meta-Me
Exposing the ORM Cache Exposing the ORM Cache Related Content Browse this Topic: Queue on Reddit Exposing the ORM Cache Familiarity with ORM caching issues can help prevent performance problems and bugs. In the early 1990s, when object-oriented languages emerged into the mainstream of software development, a noticeable surge in productivity occurred as developers saw new and better ways to create software programs.
ObjectContext и DbContext в Entity Framework (EF) поддерживают информацию о состоянии сущностей, которыми они управляют. Но, как только контекст выходит из области видимости, данная информация перестает быть доступной. Это называют кешированием первого уровня, и оно действует лишь в течение жизненного цикла транзакции. Если вы пишете распределенные приложения с применением EF, где контекст часто меняется (а значит, ваша информация о состоянии доступна не всегда), кеширование первого уровня вряд ли обеспечит ваши потребности. Доступ к данным - Second-Level Caching in the Entity Framework and AppFabric Доступ к данным - Second-Level Caching in the Entity Framework and AppFabric
Tracing and Caching Provider Wrappers for Entity Framework in C# for Visual Studio 2010
Repository, Specification, Unit of Work, Persistence Ignorance POCO with Microsoft ADO.NET Entity Framework 4.0 Beta 2 « KITCHAIYONG.NET Preface As of preparing this writing and the source codes, I was using the .NET Framework 4.0 Beta 1, Visual Studio 2010 Beta 1 and ADO.NET Entity Framework Feature CTP 1. However, the .NET Framework 4.0 Beta 2 and Visual Studio 2010 Beta 2 made their debut on 21 October 2009. I decided to upgrade the projects to this latest beta 2 version.
.NET Junkie - Faking your LINQ provider part 1 Friday, someone at Stackoverflow asked how to hide LINQ enabled persistence frameworks behind an abstraction (the repository pattern). I pointed him to a question on Stackoverflow that I answered a few days earlier in what I explained how to allow your LINQ to SQL project to be unit testable. Friday’s question however, was about being able to easily change the O/RM later on, and specifically with multiple data stores / databases involved. Let me start by saying that due to the current difference in behavior and quality between both open source and commercial LINQ provider implementations, it is hard to completely abstract away such implementation, while still allowing to use LINQ to Expression queries that are effectively translated to database queries.
asp.net mvc 3 - MVC, EF - DataContext singleton instance Per-Web-Request in Unity I have a MVC 3 web application, where I am using the Entity Framework for the data access. Furthermore, I have made a simple use of the repository pattern, where e.g. all Product related stuff is handled in the "ProductRepository" and all User related stuff is handled in the "UserRepository". Thus, I am using the UNITY container, to make a singleton instance of the DataContext, which I inject into each of the repositories. A quick search on Google, and everyone recommends you to NOT use a singleton instance of the DataContext, as it might give you some memory leaks in the future. So, inspired by this post, making a singleton instance of the DataContext for each web request is the answer (please correct me if I am wrong!) http://blogs.microsoft.co.il/blogs/gilf/archive/2010/05/18/how-to-manage-objectcontext-per-request-in-asp-net.aspx
Generic Repository Pattern - Entity Framework, ASP.NET MVC and Unit Testing Triangle
О разработке ПО и эффективности: Code First Migrations + Entity Framework 4.3 Beta 1 На днях, а точнее 12 января увидел свет Entity Framework 4.3 Beta 1. Основная тема этого релиза – EF Code First Migrations. Помимо этого, есть несколько изменений, которые тоже имеет смысл упомянуть.
Mapping private/protected/… properties in Entity Framework 4.x Code First | Jiří {x2} Činčura Mapping private/protected/... properties in Entity Framework 4.x Code First More than a year ago I was blogging about how to map private/protected/... properties in Code First CTP4 for the time being. Well it a long time and a lot of changed.
Testability and Entity Framework 4.0
Mvc & jQuery CMS - The Repository Pattern with EF code first & Dependeny Injection in ASP.NET MVC3
Entity Framework POCO (EF4): Generic Repository and Unit of Work Prototype
POCO in the Entity Framework : Part 3 – Change Tracking with POCO - ADO.NET team blog
Implementing the Repository and Unit of Work Patterns in an ASP.NET MVC Application (9 of 10)
Entity Framework « Sergey Barskiy's Blog
ObjectContext Undo, Cancel?
Developing web apps using ASP.NET MVC 3, Razor and EF Code First - Part 1 - Shiju Varghese's Blog
EF Feature CTP5: Pluggable Conventions - ADO.NET team blog