프로젝트

일반

사용자정보

개정판 6fb40c43

ID6fb40c43943ff9d388b5cf6d659b1e39f2e1ceae
상위 c1946e9c
하위 abe0007b

GeunHo Song 이(가) 약 2년 전에 추가함

issue #000 docPage 테스트 데이터 만들 때 DocInfo_id값 체크.

Change-Id: I30b6a00a8cba868ced7ea3fa195bf510d8358ad0

차이점 보기:

ConvertService/ServiceBase/Markus.Service.DataBase.Dapper/Repositories/DOCPAGERepository.cs
54 54
				}
55 55
				else if (this.DBMS == DBMSType.POSTGRESQL)
56 56
                {
57
                    var items = docPages.Select(x => new InsertDocPage
57
                    var items = docPages.Where(doc=>!string.IsNullOrEmpty(doc.DOCINFO_ID)).Select(x => new InsertDocPage
58 58
                    {
59 59
                        docinfo_id = x.DOCINFO_ID,
60 60
                        page_number = x.PAGE_NUMBER,
......
92 92
			return result;
93 93
		}
94 94

  
95
        // call stored procedure at data access layer for example StudentDAL.cs
96
        public void CallStoredResultSet<T>(InsertDocPage[] inputParameters) where T : class
97
        {
98
            //var conn = _GetOpenConnection();
99
            //var tran = _BeginTransaction(conn);
100

  
101
            var tran = BeginTransaction();
102
            NpgsqlCommand command = new NpgsqlCommand("convert_insert_docpage", (NpgsqlConnection)this.Connection);
103
            command.CommandType = CommandType.StoredProcedure;
104

  
105
            var cmdParam = command.CreateParameter();
106
            cmdParam.ParameterName = "docpages";
107
            cmdParam.DbType = DbType.Object;
108
            cmdParam.Value = inputParameters;
109
            cmdParam.DataTypeName = "type_insert_docpage[]";
110
            command.Parameters.Add(cmdParam);
111
            command.Transaction = (Npgsql.NpgsqlTransaction)tran;
112
            //await command.ExecuteNonQueryAsync();
113
            tran.Commit();
114

  
115

  
116
        }
117 95
        public class InsertDocPage
118 96
		{
119 97
            [PgName("docinfo_id")]

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)