public class Size { public string Name { get; set; } public int Height { get; set; } public int Width { get; set; } } Consider that we have Size Class for advertisement which is having Heigth, Width and Name as property in it. Now Requirement is I have to find out the all product with distinct Name values. Size[] adv = { new Size { Name = “Leaderboard”, Height = 90, Width = 728 }, new Size { Name = “Large Rectangle”, Height = 280, Width = 336…
Search Results for: linq
Dynamic Pivot Linq C#
I have the following collection / table Category Type Detail CostAuto Hybrid AC 80Auto Hybrid Sunroof 100Auto Standard AC 120Motorcycle Standard Radio 60 Is there a way with linq to get this to pivot to look like this? Category Type AC Radio Sunroof Auto Hybrid 80 0 100 Auto Standard 120 0 0Motorcycle Standard 0 60 0 use the let keyword to generate a key for use with the group by clause like so: var query = from item in list let key = new { Category = item.Category, Type…
Linqer (SQL to Linq converter)
Linqer is a SQL to LINQ conversion tool. It helps learning LINQ and convert existing SQL statements. Not every SQL statement can be converted to LINQ, but Linqer covers many different types of SQL expressions. Linqer supports both .NET languages – C# and Visual Basic. Because LINQ is a part of the C# and VB languages, it is sensitive to data type conversion. Linqer performs required type castings in the produced LINQ statements. It can convert the most usable SQL Server functions. The full list of supported MSSQL functions can…
NET9 is here
NET 9 is here and out today. In this post, I highlight the top updates across 8 key areas. Are you ready to migrate to NET9?
How to use FlexLayout with different sizes
In this new post, I want to show you via a simple project how to use in MAUI FlexLayout with children with different sizes.
Build your sentence in MAUI
How to create a simple component to build your sentence in MAUI using taps and gestures. Source code available.
Display HTML with MAUI Label
I show how display HTML with NET8 MAUI Label using only the Label attributes. The source code of this post is available on GitHub
Country data library for NET8
I’m going to release a simple cross-platform offline country data library for NET8. The library is based on the ISO-3166-1 standard
Create TabBar in MAUI
I show you how to create a nice #TabBar in #MAUI without using any external NuGet package or components. Fully customizable and 100% #XAML.
Evaluate Postfix expression for interviews
I will show how to evaluate Postfix expression for your interviews. What is a Postfix? How to write a simple code to evaluate an expression?
Simple XML minifier in C#
In this new post, I give you my code for a simple XML minifier in C#. I know I always have strange thought but I’m a developer
Markdown editor with Blazor
In this new post, I will show you have to create a simple Markdown editor component for Blazor Assembly and Blazor Server. Source code inside.
Universal PredicateBuilder for Expression
In this new short post, I’ll show you how to create a universal PredicateBuilder for Expression in C# to merge 2 or more expressions with Linq
How to Export Data to Excel in Blazor
In this new post, I’m going to show how to export data to Excel in Blazor WebAssembly or Server. Creating and exporting data to Excel file is one of the frequently used feature in web apps. First, for creating an export in Excel, I will use a free library that is a NuGet package. ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API. So, you can download the full source…
Write a reusable Blazor component
First part of a Blazor article series to tell how to create a reusable Blazor component that will be used in your Blazor applications
Creating .NET Core API with versioning
A versioning allows clients to continue using the existing REST API and migrate their applications to the newer API when they are ready.
Datatables in ASP.NET Core Server-Side
We will learn how to use Datatables in ASP.NET Core with Server-Side Processing with a simple real-world implementation to understand better
UITest with C# and Selenium Grid
Sometimes we don’t know from how to start testing our UI. Here I explain how to write UI Test with C#, Selenium and Selenium Grid from scratch
New View Components in AdminLTE project
I continue to add more features and in particular new view components in AdminLTE project built with ASP.NET Core
Integration with Identity in AdminLTE project
I continue to add more features to the integration of AdminLTE with Identity and IdentityServer in AdminLTE in an ASP.NET Core project
Features for AdminLTE with ASP.NET Core
I want to add new cool features for AdminLTE with ASP.NET Core. The source code of this template is on GitHub #aspnetcore #adminlte #mvc #gravatar #breadcrumbs #navigation
Connect web application to PowerBI
How to connect a web application to PowerBI to give users a unique experience across a website using the PowerBI APIs
Test our code with json
Test Driven Development (TDD) helps you to validate your code but something you need to check some result from a json file. Here my solution
Digital transformation scenario with Azure, Visual Studio and Git
In a company prospective, what digital transformation is about? In this post I explain my point of view
Working with CarouselView in Xamarin Forms
Xamarin.Forms code runs on multiple platforms – each of which has its own filesystem. This means that reading and writing files is most easily done using the native file APIs on each platform. Alternatively, embedded resources are a simpler solution to distribute data files with an app. CarouselView CarouselView is available in Xamarin.Forms 4.3. However, it is currently experimental and can only be used by adding the following line of code to your AppDelegate class on iOS, or to your MainActivity class on Android, before calling Forms.Init: Prerequisites Visual Studio…