diy / opensourcerer.diy.org

A DIY Guide to Git, GitHub and open source collaboration!
opensourcerer.diy.org
Other
14 stars 14 forks source link

Entity Framework 6 - code first approach with existing data base - oracle Stored procedures with Refcursor mapping issue #15

Open Dharma1986 opened 9 years ago

Dharma1986 commented 9 years ago

Hi Good Day!

I have an existing oracle stored procedure with ref cursors as below.

procedure ibp_country_mstr_getlist
          (       
           p_country_id   in     number,           
           p_cntry_getlist out   SYS_REFCURSOR
           )as
 begin
      open   p_cntry_getlist  for
      select /*+index(ibt_country_master country_mas_status_idx)*/country_pid,country_code,country_name,country_fname
     from     ibt_country_master
    where     country_pid=p_country_id
    and       country_status in ('A','D');
 end;

and i m having the below Country model.

public class Country
    {
        public long Id { get; set; }        
        public string Code { get; set; }
        public string Name{ get;set;}
        public string StateFlag{get;set;}
        public string ZipCodeFlag{get; set; }
        public string ForeignLanguageName{get;set;}        
        public bool IsEuropeanCountry{get; set; }
        public bool IsCrossBooking{get; set;}
    }

Now i m trying the access this sp in my appliation which using EF6(code first- existing db approach) but i cant able to access the above store procedure. Please tell me procedure to access sp in EF6(code first- existing db approach) with ref cursor since i m new for EF.

Thanks in advance.

Regards Dharma

yopez83 commented 8 years ago

Did you get it to work or do you still need help?