.net, C# and programming (Page 3)

LINQ: Group by byte

LINQ is powerful tool for collection (or enumeration) operating. You use functional-like syntax for filtering, grouping, transforming data. All LINQ methods work with common interface IEnumerable<T> and usually methods do not check real type of collection, or data type. Sometimes, if you know the type of collection or generic type, you can optimize code for better performance (like in Any vs Count).

This article will show, how you can speed up grouping by specific key - byte.

Read more...

LINQ: Any() vs Count

Эта статья началась с обсуждения на Stack Overflow: Why LINQ method Any does not check Count?. Здесь мы сравним производительность методов Any и Count != 0.

Read more...

LINQ: Any vs Count

This post started from discussion on SO: Why LINQ method Any does not check Count? This article shows comparison of performance methods Any and Count = 0.

Read more...

Patterns: Specification

Specification pattern unites Domain-Driven Design, application architecture modeling and Entity Framework in C#. Specification pattern is designed to order business rules and connect our code to the business terms. This article shows an example of implementation with Entity Framework.

Read more...

Xml serializer - volatile api contract

Working with some API you expect that this API will stay stable and return the same type of result from call to call. But, sometimes it does not work this way. In the article I will tell about integration with SOAP-service and volatile contracts.

Read more...