Posts

Showing posts from December, 2015

ASP.NET Web API - part 1

Image
Introduction A Web API is a server side interface consisting of one or more publicly exposed endpoints to work in a request-response message system, typically express in JSON or XML. These RESTful Web APIs are accessible via standard HTTP methods by a variety of HTTP clients including browsers and mobiles and tablets.  ASP.NET Web API is a framework for building Web API's on top of .NET framework. It has features similar to MVC like - routing  - controller  - action  - filter  - model binder etc It is part of ASP.NET platform and can be used with ASP.NET (MVC / W ebform)  applications  and also as a standalone web service application. Why Web API Today, a web-based application is not enough to reach it's customers. People are very smart, they are using iphone, mobile, tablets etc. devices in its daily life. These devices also have a lot of apps for making the life easy. Actually, we are moving from the web towards apps world. So, if you like to expose

convert blog from wordpress to google blogger

Wordpress 1. login to wordpress 2. export your blog using built-in functionality 3. save file as  wordpress-blog.xml Third Party 1. go to  http://wordpress2blogger1.appspot.com/ 2. upload your wordpress-blog.xml file using choose button 3. press convert button and save output file as wordpress-to-blogger-blog.xml Google Blogger 1. login to google blogger account 2. import blog by choosing file  wordpress-to-blogger-blog.xml  using built-in functionality 3. select "publish after import" checkbox if you want to publish your blog after import process 4. all post gets enlisted in your google blogger. Have a good day.

left outer join using linq query syntax

var result = from p in _context.ParentTable<br/>  join c1 in _context.ChildTable1 <br/>on p.ID equals c1.ID into pc1Table <br/>from pc1Join in pc1Table.DefaultIfEmpty()<br/>  join c2 in _context.ChildTable2 on p.ID equals c2.ID into pc2Table from pc2Join in pc2Table.DefaultIfEmpty()  where (c1.columnname == "value1" ||  c2.columnname == "value2") &amp;&amp; p.columnname == "value"  select new  {  pID = p.ID,  c1ID = c1.ID,  c2ID = c2.ID}; &nbsp;

unique constraint is case in-sensitive

CREATE TABLE category ( catdb_id bigserial NOT NULL, catdb_name character varying, catdb_remarks character varying, CONSTRAINT catdb_id_pk PRIMARY KEY (catdb_id) ) INSERT INTO category(catdb_name) VALUES('DyCharleS') ---successfully inserted INSERT INTO category(catdb_name) VALUES('dycharles') ---successfully inserted