Skip to content

Instantly share code, notes, and snippets.

View gnncl's full-sized avatar
🏠
Working from home

Ali Gunenc gnncl

🏠
Working from home
View GitHub Profile
@gnncl
gnncl / Program.cs
Last active February 11, 2022 07:33
Özellikle Postgresql EF Linq Contains aramalarında Case Insensitive ve Türkçe karakter problemleriyle uğraşmak istemiyorsanız kullanışlı olabilir.
using System;
using System.Collections.Generic;
using System.Linq;
namespace IQueryableSearchTest
{
public class Program
{
public static void Main(string[] args)
{
@gnncl
gnncl / ExpressionBuilder.cs
Created April 29, 2021 17:08 — forked from teleginski/ExpressionBuilder.cs
C# .NET - Expression Builder - Dynamic Filter - Dynamic Where
public static class ExpressionBuilder
{
private static readonly MethodInfo containsMethod = typeof(string).GetMethod("Contains");
private static readonly MethodInfo toLowerMethod = typeof(string).GetMethod("ToLower", new Type[0] { });
public static Func<T, bool> GetExpression<T>(IList<Filter> filters)
{
ParameterExpression parameter = Expression.Parameter(typeof(T), "t");
Expression expression = null;
@gnncl
gnncl / EnumerableExtensions.cs
Created April 29, 2021 17:08 — forked from forcewake/EnumerableExtensions.cs
Sorting expression dynamically using LINQ
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
public static class EnumerableExtensions
{
public static IEnumerable<T> OrderBy<T>(this IEnumerable<T> collection,
string columnName, SortDirection direction = SortDirection.Ascending)
{
ParameterExpression param = Expression.Parameter(typeof(T), "x"); // x
@gnncl
gnncl / !WhatsApp On Web Monitor.md
Created May 9, 2019 07:58 — forked from parthpower/!WhatsApp On Web Monitor.md
Simple JS to monitor offline and online time of a contact.

WhatsApp On Web Monitor

What It does

It gives notifications when someone goes online or offline or typing. Open chat of the contact you want to monitor and start script.

Simple Way