I have one project inside that I have SqlServerFunctions
in test.cs file.
code:
[Microsoft.SqlServer.Server.SqlFunction]
public static SqlDecimal CalculateBondDV0N(SqlDecimal coupon, SqlDecimal yield, SqlDateTime date)
{
DayCount dayCount = (DayCount)Enum.Parse(typeof(DayCount), dayCountString.ToString(), true);
Frequency frequency = (Frequency)Enum.Parse(typeof(Frequency), frequencyString.ToString(), true);
double price = BondAnalyticsUtility.CalculateDV0N((double)coupon.Value, dayCount, frequency, (double)yield.Value, date.Value, finalPaymentDate.Value, (double)redemptionValue.Value, (double)notional.Value, (double)spreadChange.Value);
SqlDecimal returnVal = new SqlDecimal(price);
return returnVal;
}
And this function get called from Sql Server inside Scalar valued function by giving EXTERNAL
parameter.
ALTER FUNCTION [dbo].[CalculateBondDV0N](@Coupon [decimal](18, 6), @Yield [decimal](18, 6), @Date [datetime])
RETURNS [decimal](18, 7) WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [Pearl.Analytics.Services.Database].[BondAnalytics].[CalculateBondDV0N]
I want to debug this function the code is in c# trying to debug in into VS2010 pro how can i attached it with database and do this.?