Я не могу создать хранимую процедуру в npgsql, используя ASP.NET MVC 5.
Мой код миграции:
CreateStoredProcedure("dbo.CustomerDetails_Insert",
p => new
{
p_chrv_ah_name = p.String(maxLength: 150),
p_chrv_ah_desig = p.String(maxLength: 50),
p_chrv_org_name = p.String(maxLength: 150),
p_chrv_org_phone = p.String(maxLength: 50),
p_chrv_org_email = p.String(maxLength: 150),
p_chrv_org_logo = p.String(maxLength: 150),
p_chrv_org_logo_path = p.String(maxLength: 255),
p_chrv_pwd = p.String(maxLength: 12),
p_tms_agreement_on = p.String(maxLength: 150),
p_chrv_agree_scan_copy = p.String(maxLength: 150),
p_chrv_agree_scan_copy_path = p.String(maxLength: 150),
p_chrv_ip_address = p.String(maxLength: 150)
},
body:
@" DECLARE id character varying;
id= select 'cust' || EXTRACT (month from current_date)|| to_char(current_date,'yy')|| (select LPAD(CAST((select coalesce(max(int_slno),0)+1 from dbo.customer_details) as character varying),2,'0'))
INSERT INTO dbo.customer_details(chrv_cust_id,chrv_ah_name,chrv_ah_desig,chrv_org_name,chrv_org_phone,chrv_org_email,chrv_org_logo,chrv_org_logo_path,int_created_by,chrv_ip_address,chrv_pwd,tms_agreement_on,chrv_agree_scan_copy,chrv_agree_scan_copy_path)
VALUES(id,p_chrv_ah_name,p_chrv_ah_desig,p_chrv_org_name,p_chrv_org_phone,p_chrv_org_email,p_chrv_org_logo,p_chrv_org_logo_path,0,p_chrv_ip_address,p_chrv_pwd,p_tms_agreement_on,p_chrv_agree_scan_copy,p_chrv_agree_scan_copy_path);
"
);
, но я получаю эту ошибку
Необработанный MigrationOperation CreateProcedureOperation в NpgsqlMigrationSqlGenerator
У кого-нибудь есть решение для этого?Если это так, пожалуйста, напишите.
Заранее спасибо