Skip to main content

Posts

Bounded DbContext with Generic Unit of Work, Generic Repositories, Entity Framework 6 & EntLib Unity 3.0 in MVC 4

Update: 08/12/2013 – Changed InjectionConstructor parameter to: ResolvedParameter(), to trigger compilation of the container when setting up the DbBounded Context and UnitOfWork(s) registrations. Update: 08/08/2013 – Added PerRequestLifetimeManager() to the IUnitOfWork Unity Registration (binding) in UnityConfig.cs, so that the life-cycle of the UnitOfWork(s) instances being injected have singleton behavior within the scope of an Http request. Update: 08/07/2013 – Ken from Microsoft has been kind enough to reach out and inform those of us that are using EF4 or EF5, that there maybe some potential collision issues, if there are entities with overlapping names, even if they live in different assemblies, please read below for a potential solution for this. If this does not apply to your use case or scenario, please continue on to the blog post after the block-quote. At the risk of spamming your blog in comments I am turning to email. This is Ken the poster on your blog. J Your BoundedCon…
Recent posts

Upgrading to Async with Entity Framework, Web Api, OData AsyncEntitySetController, Kendo UI, Glimpse & Generic Unit of Work Repository Framework v2.0

Update [11/18/2013]: Added mocked DbContext and DbSet and example Unit Tests using the mocks, download v2.1 https://genericunitofworkandrepositories.codeplex.com. Fake DbContext (framework) Fake DbSet (framework) Fake DbContext (implemented) Fake DbSet (implemented) Unit Tests using the Mocks Thanks to everyone for allowing us to give back to the .NET community, we released Generic Unit of Work and Repository Framework v1.0 for four weeks and received 655 downloads and 4121 views. This post will also serve as the documentation for release v2.0. Thanks to Ivan (@ifarkas) for helping out on the Async development, Ken for debugging the Unit of Work life cycle management for use in web applications with DI & IoC (specifically with Entlib Unity v3.0) and scaling the framework to handle Bounded DbContexts, and to the Glimpse Team (@nickswan ) for helping out on getting Glimpse MVC4 working with MVC5, and providing guidance on how to leverage Glimpse EF6 to view SQL queries from EF. This…

Harness the Power of ASP.NET MVC, Web Api, OData, Kendo UI & RequireJS to Build an Easy & Maintainable SPA (for the .NET Developer) – Published

Apologize for the delay, the original article: "Harness the Power of ASP.NET MVC, Web Api, OData, Kendo UI & RequireJS to Build an Easy & Maintainable SPA (for the .NET Developer)" has now been published as "A .NET Developer Primer to Single-Page Applications (SPA)". Download: https://lelong37.files.wordpress.com/2014/03/msdn-mag-1403.pdf Online: http://msdn.microsoft.com/en-us/magazine/dn605877.aspx Source code: https://easyspa.codeplex.com Live Demo: http://easyspa.azurewebsites.net/home/spa#/customer/index
✔ Read More...
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with …

Quick Example of using Git with CodePlex for Clone, Changes, Commit, Sync & Restoring Missing NuGet Packages

This post is for those of us that are (primarily .NET developers) that have been accustomed to using Team Foundation Server as a source coded repository and now just getting started with Git. Git is a fairly mature and an advanced source code repository with many more features than I'll actually get into. The intent of this screen cast is to get you started with Visual Studio 2013 Git integration. Although this screen cast uses CodePlex in the demo, the process should be the same for any another Git repository e.g. TFS 2012+, GitHub.com, CodePlex, Visual Studio Online TFS, etc. *Please configure YouTube player in Full HD for optimal viewing For more info on CodePlex: http://codeplex.codeplex.com/wikipage?title=Using%20Git%20with%20CodePlex
✔ Read More...
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who …

AngularJS & Kendo UI using Angular Kendo with ASP.NET MVC 5, Web API & OData

Update: 9/12/2014 – Codeplex source code download URL update. Update: 5/1/2014 – Customer View & customerController.js has been updated to toggle styles by manipulating the DOM through the ViewModel with ng-show to adhere and stay consistent with AngularJS best practices. Update: 5/14/2014 – Added section "Animating our View Swapping", to elaborate on adding animation to the "ng-view" swapping process. Source code: http://goo.gl/f1esAf Live demo: http://longle.azurewebsites.net With AngularJS and ASP.NET MVC, we now have an MVC pattern and architecture for both on the client and server. What do we do and/or how do we approach this? Well one can argue we don't use any of the MVC architecture on the server and build out a full-fledged AngularJS front-end application and only use make async calls to Web API for all things that absolutely need to be on the server e.g. CRUD, workflows, business logic, etc. Now, there's absolutely nothing wrong with this appr…

Unit testing using NUnit in Visual Studio 2010

What is Unit testing? Unit testing is a method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine if they are fit for use. Intuitively, one can view a unit as the smallest testable part of an application. Let me take the example of the 'Calculator' for demonstrating the unit testing. SOFTWARE REQUIREMENTS: Windows 7 as OS Microsoft Visual Studio 2010 as IDE NUnit as Unit Testing Tool SET-UP INSTRUCTIONS: Create a new Project with C# Class Library and save it ('Calculator' in my example). Rename the class 'Class1.cs' to 'Operator.cs'. Add the NUnit frameworks into the 'Solution Explorer' by context-clicking on the project name and then select 'Add Reference' menu item. When the Add Reference dialog appears, click on 'Browse' and navigate to C:\Program Files (x86)\NUnit 2.5.10\bin\net-2.0\fr…

ETL #73–NULL or NOT NULL and SQL Interview Questions

Today is the day after Thanksgiving. There are many things to be thankful so I decided to write a short post today. The first thing to be thankful is that Tomislav and I have completed the third edition of our MDX book, MDX with Microsoft SQL Server 2016 Analysis Services Cookbook. The book is published by Packt Publishing and has been uploaded to all the major publishing channels. Recommend SQL interview questions on deskbright.com The second thing to be thankful is the enthusiastic audience who have been faithfully reading my posts. I recently received two inquires, which are somehow related. One reader was a bit confused by what I said about the SQL NULL values and what I said about being careful of what we put in the WHERE clause. Another reader is from Deskbright.com, a new online learning platform. Deskbright.com offers a number of free online resources to help people learn business skills — such as SQL. They are wondering if I'd be willing to post a link to their page on SQ…