Posts

How to insert json data directly into table in sql.

Let us consider the below JSON as sample data, ex: [{ "info": [{ "id": 1, "name": "John", "surname": "Smith", "age": 25 }, { "id": 2, "name": "Abijal", "surname": "Smith", "age": 45 }, { "id": 3, "name": "Abhijit", "surname": "singh", "age": 41 }] }] To insert the above JSON we can use the below query, Query: declare @json varchar(max) =' [{ "info": [{ "id": 1, "name": "John", "surname": "Smith", "age": 25 }, { "id": 2, "name": "Abijal", "surname": "Smith", "age": 45 }, { "id": 3, "name": "Abhijit", "surname": "singh"...

How to use youtube api's in your application.

Image
First of all, go to the google developer console site and add your google account. URL:  https://console.developers.google.com/ Then the screen shows up, Now, click on select a project on the navbar. Then the screen shows up, Now enter your project name and organization etc, then click on enter. Then it will ask for 2 types of access,  1.OAuth 2.0,  2.API Key   you can use OAuth 2.0 if you want. Here i have selected API Key to get access Then the screen shows up, Now, you have the API Key to get access to google api's. Note: Copy and paste the API Key in a notepad for further use. Now go to the youtube for the developers site. Url:  https://developers.google.com/youtube Then below screen shows up, Here, click on samples from nav bar and select the language you are using and again select references from the navbar. Then the below screen shows up. Now, Here i want to show th...

Implement virtualisation in kendo drop down list using jquery ajax in mvc, aspx page

virtualization helps to load huge data fastly. $("#abcd").kendoDropDownList({                 filter: "contains",                 dataTextField: "WorkOrderNumber",                 dataValueField: "WorkOrderNumber",                 virtual: {                     itemHeight: 26,                     valueMapper: function (options) {                     }     ...

Implement basic authentication in web api c#

First, create an empty web API project . Then follow the below steps: Here I want to validate the user if the user exists then display the employee details based on username. 1. Create a User model class and Employee model. User Model Class Employee Model Class public class User     {         public int ID { get; set; }         public string UserName { get; set; }         public string Password { get; set; }     }     public class Employee     {         public int ID { get; set; }         public string Name { get; set; }         public string Gender { get; set; }         public string Dept { get; set; }    ...

How to get or extract the data from different json format in c#, webapi

                        JSON  C# Code  Model Class Sample 1: {    "EmployeeList": [       {          "EmpNumber": "10029597-3",          " JobCode ": "03363-001",          " Location ": "Triad North"       },       {          " EmpNumber ": "10029600-1",          " JobCode ": "03363-001",          " Location ": "Triad North"       },       {          " EmpNumber ": "10029626-2",     ...