You will learn two major things in this article:
- Create GET Custom Method Web API using .Net Framework.
- Testing Web API GET Method using Talend Chrome Browser Extension.
We are going acheive the above two major things with the help of the followings steps,
- Create SQL Table and Insert Data using Query
- Asp.Net Web API Application Creation
- Linq to Sql Class
- Write GET Custom Method of Web API
- Test Asp.Net Web API GET Method in Browser
- Install Talend Extension in Chrome Browser
- Test Asp.Net Web API GET Method for XML and JSON output.
Create SQL Table and Insert Data using Query
Connect to your SQL Server,

Table Creation SQL Script,
- USE [MbkTest]
- go
- /****** Object: Table [dbo].[tblFriends] Script Date: 07-Jan-20 12:53:31 PM ******/
- SET ansi_nulls ON
- go
- SET quoted_identifier ON
- go
- SET ansi_padding ON
- go
- CREATE TABLE [dbo].[tblfriends]
- (
- [friendid] [INT] IDENTITY(1, 1) NOT NULL,
- [friendname] [VARCHAR](100) NULL,
- [phonenumber] [VARCHAR](50) NULL,
- [emailid] [VARCHAR](100) NULL,
- [country] [VARCHAR](100) NULL,
- [dob] [DATETIME] NULL,
- [ismarried] [BIT] NULL,
- [salaryperannum] [NUMERIC](10) NULL,
- PRIMARY KEY CLUSTERED ( [friendid] ASC )WITH (pad_index = OFF,
- statistics_norecompute = OFF, ignore_dup_key = OFF, allow_row_locks = on,
- allow_page_locks = on) ON [PRIMARY]
- )
- ON [PRIMARY]
- go
- SET ansi_padding OFF
- go
Insert Table Data Using SQL Script,
- insert into tblFriends values ('Suresh Vyas','98612134512','[email protected]','India',1990/01/01,1,450000)
- insert into tblFriends values ('Manoj Kalla','9869166077','[email protected]','India',1980/02/05,1,950000)
- insert into tblFriends values ('Kamlesh Goenka','981916607','[email protected]','India',1970/02/06,1,750000)
- insert into tblFriends values ('Prashant Bansal','781214607','[email protected]','US',1989/01/04,01,250000)
- insert into tblFriends values ('Nitin Tiwari','811012607','[email protected]','US',1992/01/04,0,350000)
- insert into tblFriends values ('Mahesh Jadhav','921052607','[email protected]','US',1998/01/06,0,42000)
Select Query to Check the Records,
- select * from [dbo].[tblFriends]


























Join the conversation! Your thoughts help the community grow.