首页 > 代码库 > Nhibernate/Hibernate 使用存儲過程 多參數設置
Nhibernate/Hibernate 使用存儲過程 多參數設置
<?xml version="1.0" encoding="utf-8" ?><hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"namespace="Mrp.Domain" assembly="Mrp.Domain"><class name="GetQpmrpWorkDomain"><id name="ActualStart"></id><property name="ActualFinish" column="ActualFinish"/> <property name="status" column="status"/></class><sql-query name="GetQpmrpWorkDomainListByParam"><return alias="GetQpmrpWorkDomain" class="Mrp.Domain.GetQpmrpWorkDomain"/><![CDATA[exec dbo.p_pms_get_qpmrp_work_info :projectid,:taskid,:info_code,:expandargs,:p_companyid]]></sql-query></hibernate-mapping>
using Mrp.IBLL;using System;using System.Collections.Generic;using System.Linq;using System.Text;using Data;using ServiceLocation;using Mrp.Domain;namespace Mrp.BLL{ public class GetQpmrpWorkManager : IGetQpmrpWorkManager { IDataAccess da = Locator.Current.GetObject<IDataAccess>(); public IList<GetQpmrpWorkDomain> GetList(string projectid,string taskid,string info_code,string expandargs,string p_companyid) { projectid = ""; NamedQuery namedQuery = new NamedQuery("GetQpmrpWorkDomainListByParam"); namedQuery.AddParameter("projectid", projectid); namedQuery.AddParameter("taskid", taskid); namedQuery.AddParameter("info_code", info_code); namedQuery.AddParameter("expandargs", expandargs); namedQuery.AddParameter("p_companyid", p_companyid); return da.GetList<GetQpmrpWorkDomain>(namedQuery); } }}
Nhibernate/Hibernate 使用存儲過程 多參數設置
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。