Browsed by
Category: .NET exposed

Change tracking optimization in Entity Framework

Change tracking optimization in Entity Framework

Entity Framework change tracking optimization Data changes tracking Entity Framework gives us an opportunity to work with data without bothering to notify database about entity changes made during data processing. EF provides few methods of tracking this modifications. Snapshot change tracking By default in Entity Framework it is enabled snapshot change tracking mechanism. It works by saving entity states each time when it is loaded from the database. When for example SaveChanges method is called, Entity Framework scans all entities…

Read More Read More

Expression> vs FUNC

Expression> vs FUNC

Both types of types: Expression<Func<T>> and Func<T> are very similar and could be used for the same type of tasks. I will try to dispel any doubts, when to use expressions or when just functions. Let’s begin with Func<TResult> type. There is simple shortage encapsulation for delegate type taking no argument and returns value of type TResult. You can define this delegate explicitly: There are also types like Func<T, TResult>, Func<T1, T2, TResult>, … which differ only with number of input…

Read More Read More