Browsed by
Tag: C#

Handling images WebAPI (+examples)

Handling images WebAPI (+examples)

WebAPI is used to serve data from server. One time of data could be images. In this post I will show how to write WebAPI methods operating on images data. So at first we must decide where we want to store our images. Let’s suppose, that we have database that store our application data. We have 2 possibilities: to store images in files or directly in database. This two approaches has following adventages: files easy to test fast requires additional…

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