Let me write today about Caching, Repository pattern and finally about CacheRepository by using Strategy pattern. So, I’ve seen a lot of developers use caching pretty differently. And mostly what I’ve seen, was, them using cache inside the Controller or BLL, if there is one. I don’t think this is a proper way of doing…
Posts Tagged
c#
Automapper Optimization
Today I’ll write about Automapper optimization when using Entity Framework. I won’t go into too much detail about what AutoMapper is and how to use it, I’ll give you just a short intro. I will focus more on how to optimize AutoMapper if you are using Entity Framework. As I see some people tend to…
INTERVIEW JOB CODING TASKS – XML file manipulation
It’s been a while, once again, since my last post. But due to a much of stuff, I’m doing in the background, I guarantee you, it’s going to be worth it! Bunch of changes is going to be presented to you very soon as well as new content, in a much more professional way. Anyway,…
How-To setup global exception handler in .NET Core?
Today I’ll try to be precise and straight to the point as possible.If you want to simplify your code by removing unnecessary try {} catch {} blocks of your code inside API Controllers, then you probably want to use some kind of global hook in which you are going to handle global exceptions. The way…
Top 10 quick code refactoring tips with C#
Hi there! A few weeks passed by since my last blog post. Well, the holiday time was on and I wish you all the best in 2020. I hope you all had a great time. But it’s time to move on. So, buckle up your seat belts and let’s move on as we have a…
INTERVIEW JOB CODING TASKS – Calculate Tree depth and a number of leaves
Season 1 – Prologue So… You want to get that developer job, right? You are preparing (or not) yourself and You pass all the “theory” questions. And then You are assigned more stuff to do…You get a bunch of coding tasks to complete. It seems so exhausting and daunting to do. It takes time and…
What is MVVM and how to implement it?!
Hi there! It’s been a while since I wrote my last article due to summertime madness. Little digression, if you are into summertime and jazz, listen to this great jazz performance by Ella Fitzgerald. What I really needed was some offline time to regenerate and prepare some great new content. So by starting from today,…
Real example of reflection
I got asked via email if I could write about reflections in C#. So I decided to postpone “Part 2 of Level-up your Xamarin apps”, and will head straight to writing about reflections. What is REFLECTION in C#? In nutshell, it’s a namespace (System.Reflection). That namespace contains classes that allow you to obtain all sorts…
Class, Constructors and Inheritance
What is a Class? Class in OOP is a representation of real world object or better to say a blueprint for creating objects. When creating an object in OOP we are using Class. So, class is a blueprint and objects are instances of a Class in an application.Each class may be consisted of several properties…
Composition
What is Composition? It’s a relationship between two classes that allows one to contain the other. When one class is subset of the other, “has-a” relationship.