Friday, August 29, 2014

Dependency Injection with Simple Injector

Before some I have written a blog post about how to do dependency injection with StructureMap. In this post we are going to learn Simple Injector IOC library and how we can do dependency injection with Simple Injector.

About Simple Injector:


Simple Injector is a open source dependency injection library developed with C#. Followings are few characteristics of Simple Injector.
  • Simple Injector is very simple to use dependency injection library support .NET 4+ framework, Silverlight 4+, Windows Phone 8, Windows 8 Including Universal apps and Mono.
  • Simple Injector is easily integrated with frameworks like ASP.NET Web Forms, ASP.NET MVC, ASP.NET Web API, WCF and many more.
  • It’s free and always be free. Published under MIT license.
  • Simple Injector is highly optimized for performance and concurrent use.
  • Simple Injector is thread safe and lock free design.
  • Simple Injector has great support for generics and used lot of things of generics then any other dependency injection libraries.
  • Simple Injector has a powerful diagnostic system.Currently it offers following validations
    • Lifestyle Mismatch
    • Short Circuit Dependencies
    • Potential Single Responsibility violations
    • Container Register Types
  • Simple Injector is amazingly fast.
  • Simple Injector is developed using Modern proven development practices such as TDD and Solid Design Principals.

Share:
Saturday, August 23, 2014

Stackoverflow.com like URLs with attribute routing in ASP.NET MVC

Before some time I have blogged about Attribute Routing features of ASP.NET MVC 5.x version.  In this blog we are going to learn how we can create stackoverflow.com like URLs with attribute routing.

As you know www.stackoverflow.com is one of the most popular questions answer site where you can ask questions and almost get the answers of your questions. So to create URLs like www.stackoverflow.com we need to understand structure of URLs of Stackoverflow. Let’s take example of following question URL which I have answered on stackoverflow.com

http://stackoverflow.com/questions/24133693/can-i-use-signalr-2-x-with-net-4-0-if-i-am-using-microsoft-bcl-upgrading-from

and let’s take another example

http://stackoverflow.com/questions/23739256/the-advantage-of-formsauthentication-class-over-session-variable

If you compare and understand structure of this URLs. You will know that there will be a two things which will be dynamic for this URLS.

Share:
Thursday, August 21, 2014

Blog post selected as ASP.NET MVC Official Additional Learning Resources

I have got news before few days that my blog post about CDN is ASP.NET MVC bundling selected as Additional Resources for learning about ASP.NET MVC on official ASP.NET Site.

On this occasion I would like to thank my audience and my family to supporting me. Thank you all without you it would not have been possible. I loved to be part of this amazing community and I promise that I would continue to do community work.

I would also like to thank Rick Anderson and Jon Galloway and whole ASP.NET Team for selecting my post. It’s a honour for me. Thanks you very much guys for encouraging and inspiring me  to do community work!!

Due to all this my blog got high ranking and I’m almost getting more then 80k page views every month. Google is loving my blog more and more!!
CaptureBlog

Thank you very much everything dear readers!!
Share:
Friday, August 1, 2014

Different way of creating keys in EFCodeFirst

Recently I have been playing with Entity Framework Code First and I like it a lot. There are plenty of features given and you can configure all that stuff with code. I have already written couple of post for Entity Framework Code First.

Different way of mapping in EFCodeFirst
Entity Framework code first and Inheritance–Table per hierarchy
Entity framework code first and inheritance- Table Per Type

As you EFCodeFirst generate database table based on the configuration defined in classes. Today we are going to learn about how we can create key with different configurations.

Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews