public void AddProfile(DoctorsProfile profile)
 {
     using (var context = new NETSTAREntities())
     {
         context.DoctorsProfiles.Add(profile);
         context.SaveChanges();
     }
 }
        public DoctorsProfile GetByDiscipline(string discipline)
        {
            DoctorsProfile profile = new DoctorsProfile();

            using (var context = new NETSTAREntities())
            {
                profile = context.DoctorsProfiles.Where(x => x.Discipline.Equals(discipline)).FirstOrDefault();
            }
            return(profile);
        }
        public DoctorsProfile GetByLastName(string lastName)
        {
            DoctorsProfile profile = new DoctorsProfile();

            using (var context = new NETSTAREntities())
            {
                profile = context.DoctorsProfiles.Where(x => x.Lastname == lastName).FirstOrDefault();
            }
            return(profile);
        }
        public DoctorsProfile GetByHPCSANoo(int hpcsan0)
        {
            DoctorsProfile profile = new DoctorsProfile();

            using (var context = new NETSTAREntities())
            {
                profile = context.DoctorsProfiles.Where(x => x.HPCSANo == hpcsan0).FirstOrDefault();
            }
            return(profile);
        }
        public DoctorsProfile GetByIDNo(int idNumber)
        {
            DoctorsProfile profile = new DoctorsProfile();

            using (var context = new NETSTAREntities())
            {
                profile = context.DoctorsProfiles.Where(x => x.IDNo == idNumber).FirstOrDefault();
            }
            return(profile);
        }
        public DoctorsProfile GetByRegion(string region)
        {
            DoctorsProfile profile = new DoctorsProfile();

            using (var context = new NETSTAREntities())
            {
                profile = context.DoctorsProfiles.Where(x => x.Region == region).FirstOrDefault();
            }
            return(profile);
        }
        public DoctorsProfile GetByProvince(string province)
        {
            DoctorsProfile profile = new DoctorsProfile();

            using (var context = new NETSTAREntities())
            {
                profile = context.DoctorsProfiles.Where(x => x.Province.Equals(province)).FirstOrDefault();
            }
            return(profile);
        }