Category: LINQ Articles

Setting Menu options Dynamically based on Role in ASP.NET using LINQ

Setting Menu options Dynamically based on Role in ASP.NET using LINQ Step 1. Add Menu control to aspx or master page. <asp:Menu ID=”menuRoleBased” runat=”server” Font-Names=”Verdana” ForeColor=”WhiteSmoke” Orientation=”Horizontal”                            BorderColor=”#FFCC99″ BorderWidth=”0px” Width=”20%” Font-Bold=”False” Font-Size=”Smaller”>                            <StaticMenuStyle BorderWidth=”1″ BackColor=”#FFCC99″ BorderColor=”White” BorderStyle=”Solid” />                            <StaticSelectedStyle Font-Names=”Verdana” BackColor=”#415779″ ForeColor=”white” Height=”25px” />                            <StaticMenuItemStyle CssClass=”menuHoverStyle” Font-Names=”Verdana” HorizontalPadding=”4px”                                […]

Aggregate functions in LINQ query

Aggregate functions in LINQ query Avearage – Returns the average value in sequence Count – Returns count of elements in sequence Max – Returns maximum value in sequence Min – Returns minimum value in sequence Sum – Returns sum of values in sequence Aggregate – Computes custom aggregation […]

LINQ to ADO.NET

LINQ to ADO.NET A .NET application can write LINQ queries to SQL, Entities and Dataset. LINQ to SQL and LINQ to Entities have direct connection with Database through ADO.NET layer.   LINQ to ADO.NET LINQ to ADO.NET Add caption

LINQ Simplified

Anonymous Method , Lambda Expressions and LINQ in C# 3.0 LINQ stands for Language Integrated Query. List contains flower name below  : List flowerList = new List();flowerList.Add(“ROSE”);flowerList.Add(“VIOLET”);flowerList.Add(“ORCHID”); LINQ Lists – Anonymous Delegates string flowerRose = flowerList.Find(delegate ( string flower ) ){return flower = “ROSE”;}); LINQ Lists – Lambda […]

%d bloggers like this: