public void _advancequicksearch() { PrefferedDoctorUnitOfWork pduow = new PrefferedDoctorUnitOfWork(); string[] prefereddoctorslist = null; var data = pduow.Context.PrefferedDoctors.Where(f => f.UserName == User.Identity.Name).Select(s => new { s.DOCTORID }); string tempdata = null; foreach (var temp in data) { if (tempdata == null) { tempdata = temp.DOCTORID; } else { tempdata = tempdata + " , " + temp.DOCTORID; } } if (tempdata != null) { prefereddoctorslist = tempdata.Split(','); } else { prefereddoctorslist = null; } ViewBag.PreferedDoctors = prefereddoctorslist; }
public PrefferdDoctorServiceRepository(PrefferedDoctorUnitOfWork uow) { _context = uow.Context; }