시퀸스 생성하는 프로시저 만들기

엔티티 모델에서 프로시저 등록하기

가져오기

        public int GetProgramSeq()
        {
            int i = 0;
            using (PbotEntities ctx = new PbotEntities())
            {
             
                var results = ctx.SP_GET_SEQ_PROGRAM();
                long? nextSequenceValue = results.SingleOrDefault();
             
                if( int.TryParse( nextSequenceValue.Value.ToString() , out i ))
                {
                    i = int.Parse(nextSequenceValue.Value.ToString());
                }

                return i;
            }
        }

+ Recent posts