Hi saibaba,

To write sql connection code in classlibrary,then to add refference of this dll into  your wpf project, from the code behind file to access that classlibrary classes and to display the wpf front end.
Thanks & Regards

RK