I have Visual Studio 2013.
I created a database project.
I added a CLR stored procedure to that project, and I want to call a WCF service from it.
Can anyone help me?
I want be able to change service address without changing my assembly, similar to what I can do in web.config with the endpoint section of my WCF client config.


I found this after a lot of searching and spend very much time on this in VS 2014
Database ProjectCalled "CLR_Test"LibraryFor WCF Client "CLR_Service_Client"Add
Serivce Refrenceof wcf service to "CLR_Test" then add refrence of "CLR_Service_Client" into "CLR_Test"4.You must change DB Option to able run unsafe assemblyes with the below code
ALTER DATABASE SaleAutomation SET TRUSTWORTHY ON RECONFIGUREIn the "CLR_Test"

Project Propertiesin theSQLCLRtab setPermission leveltoUnsafe(another way is exist that after publish project you change its level from sql server management and another way is you add permission level to script of publish you can use each of them,but you must noticed that if you use from
project propertiesonly "CLR_Test" project automaticly createUnsafeand you must use other ways to set "CLR_Service_Client"Unsafe)6.Run this Scripts to add Sqlserver be able to run wcf service