Skip to main content

Posts

Overengineering

Recent posts

Multiple complex clauses joined with OR operation in where function

How is it possible to filter data based on some set of filters or expressions that should be used with or operation in where clause? For example, there is a class: class DTOFilter { public string Domain { get ; set ; } public string Mobile { get ; set ; } } It is required to filter Users list based on the list of the filters next way: u => ( u . Email . Contains ( filters [ 0 ]. Domain ) && u . PhoneNumber . StartsWith ( filters [ 0 ]. Mobile )) || ( u . Email . Contains ( filters [ 1 ]. Domain ) && u . PhoneNumber . StartsWith ( filters [ 1 ]. Mobile )) || ... But the more usable form would be: db . Users . Where ( filters . Filter < Users , DTOFilter >( ( u , f ) => u . Email . Contains ( f . Domain ) && u . PhoneNumber . StartsWith ( f . Mobile )) . Or ())

[Obsolete] Azure package unpack and repack

Azure package There are a lot of possible scenarios of Azure deployment. Most of them are based on package that we can define and create with Visual Studio. If you need to change package use Visual studio to repack your project. To prepare specific web . config file, use different build configuration with transformation (web . config . release, web.config.debug etc.) Only when it's not possible to use Visual Studio to repack Azure package, then it's possible to repack it the way described below.

[Obsolete] Azure deployment. Connectionstrings

Azure resource group This template is used to create an azure deployment project . Based on a wizard , it generates file with list of console commands to perform the automatic deployment , with or without visual studio. After the project is created it can be configured and modified. Those types of projects are flexible and has a great possibility

[Obsolete] Caching GET requests in IE

GET request The main goal of GET request is to show some data to the user: page, part of the page, control or just data. GET request shouldn’t contain any data changes or any function that leads to changes in the system to be done. Based on that it’s logical to cache GET requests, until page update after another POST request is needed.

System solutions in MS Dynamics CRM

In storage model description was described, how different types of solutions affect component storage in system. And only one system solution was mentioned: "Active solution", but it's not alone in CRM system. System solutions There are four standard solutions in any CRM organization