LINQ Skip with example
The Skip query operator will ignore the specified number of input elements from the start of the input sequence and return the remainder. The following code skips over the first three elements and returns the rest: using System; using System.Collections.Generic;...
read moreuser defined sql function in sql server
create function ganesha(@id int) returns int as begin declare @work int select @work=avg(salary) from emp_info where id=@id; return @work; end; declare @my int select dbo.ganesha(1) b) alter function myfun(@date datetime) returns varchar(50) as begin declare @myoutput...
read moreLINQ TakeWhile with example
TakeWhile: This operator is useful when we want to iterate a long list of items. During iteration we can get list of items by using predicate function. Let’s take a example where I will generate numbers using IEnumerable range method and get items as per predicate...
read moresql joins in sql server
--Self Join select *from emp as p where p.salary=p.gsalary --Equi Join select d.*, e.* from dept as d , emp as e where d.id=e.deptids --Inner Join select d.*, e.* from dept as d inner join emp as e on d.id=e.deptids --Outer Join --Left Outer Join select e.*, d.* from...
read moreLINQ Partitioning Operators with example
The partitioning query operators take an input sequence and partition it, or “return a chunk” in the output sequence. One use of these operators is to break up a larger sequence into “pages,” for example, paging though ten results at a time in a user interface. 1....
read moreSelectMany query operator in linq
SelectMany query operator produces a variable number of output elements for each input element. In simple words if any collection have collection as an its element then using selectmany we can read that child connection item. Example using System; using...
read moretriggers in sql server
create trigger getid on [login] after insert as select @@identity as mynewid insert into [Login](username ,password) values('aabc','bbcc') disable trigger getid on [login] enable trigger getid on [login] create trigger trig_uppercase on [state] after insert ,update as...
read moreCSS3 2D transformation with javascript example
As we know that CSS3 support 2d and 3d animation or tranformation support. In this blog I am writing methods and code for CSS3 2d transformation. CSS3 transforms allow you to translate, rotate, scale, and skew elements.A transformation is an effect that lets an...
read moreProjection Operators in LINQ
Projection Operators in LINQ Input sequenceà Output sequence (Input sequence of elements can be modified using projection operators).We can set output sequence format using projection operator. Select : Using select projection operator , we can project specified value...
read moreRestriction Operator (where) in LINQ
In general queries we take input sequence of items and generated output sequence as per given condition for example we have the list of various department employees and we want to take information only those employess who are belong to IT department . In that...
read moreCustom html helpers in asp.net MVC 5
Custom html helpers can be created by extension methods. Extension method can be crated by static methods in static class. In my example I am going to create two custom html helpers for html submit button and for image.In built-in or standard html helpers there are no...
read moreConstructors in C# with demo
Constructors in C sharp The syntax for declaring basic constructors is a method that has the same name as the containing class and that does not have any return type: public class Student { public Student() { } //other class definition It’s not necessary to provide a...
read morestrongly typed html helpers in asp.net mvc razor
Strongly typed html helpers are introduced in MVC 2. In this kind of helpers we can generate html markup or view using model properties and lambda expression. These methods use a "Html.HelperNameFor()” naming convention. for example we have created model property like...
read moreautomapper in Csharp with example
AutoMapper in C# AutoMapper is utility package provided by the Microsoft net framework. Automapper provides mapping between one class object to another class object. In simple words assigning properties values of one class into another class is called automapping. You...
read moreInline HtmlHelpers in asp.net MVC 5
The @helper syntax within Razor enables you to easily create re-usable helper methods that can encapsulate output functionality within your view templates. They enable better code reuse, and can also facilitate more readable code. Example1 : step1. Create Controller...
read moreCSS3 Introduction and Selectors
CSS3 is based on CSS 2.1 specification and is completely backward compatible with CSS2. The old specification of CSS2.1 was becoming too large and complex to update as one unit, hence development of CSS3 specification is split up into Modules. Modules can evolve...
read moreHow to take all database backup in sql server
Generally we face a problem when we want to upgrade our sql server management studio version , all the databases are lost. To take all database backup one by one is completely irritating. To overcome this irritating job , our sql provides a great solution to take all...
read moreangular services tutorial with examples
There are various inbuilt services in angular like $location, $timeout, $root-Scope etc.The main benifit of these service components are that they hold some inbuilt logic that's required at multiple points within our application. Although services and factories are...
read more