private bool IsPetAlreadyInList(List<Pet> petList, Pet currentPet)
 {
     foreach (Pet pet in petList)
     {
         if (pet.ID==currentPet.ID)
         {
             return true;
         }
     }
     return false;
 }
		private void detach_Pet(Pet entity)
		{
			this.SendPropertyChanging();
			entity.Client = null;
		}
		private void attach_Pet(Pet entity)
		{
			this.SendPropertyChanging();
			entity.Client = this;
		}
 partial void DeletePet(Pet instance);
 partial void UpdatePet(Pet instance);
 partial void InsertPet(Pet instance);
        private void FillDataBase()
        {
            
            Client firstClient = new Client();
            firstClient.Name = "Митрон П.Е.";
            firstClient.Email = "*****@*****.**";

            _repository.AddClient(firstClient);

            firstClient = _repository.GetClientByName(firstClient.Name);


            Pet firstPet = new Pet();
            firstPet.Name = "Шарик";
            firstPet.Kind = "Собака";
            firstPet.Master = firstClient.ID;
            _repository.AddPet(firstPet);

            Pet secondPet = new Pet();
            secondPet.Name = "Борис";
            secondPet.Kind = "Кот";
            secondPet.Master = firstClient.ID;
            _repository.AddPet(secondPet);

            Doctor firstDoctor = new Doctor();
            firstDoctor = new Doctor();
            firstDoctor.Email = "[email protected]";
            firstDoctor.Password = PasswordHasher.GetHashPassword("123");
            firstDoctor.Name = "Викторов П.М.";
            firstDoctor.ConfirmAdmin = true;
            firstDoctor.ConfirmEmail = true;
            _repository.AddDoctor(firstDoctor);


            Procedure firstProcedure = new Procedure();
            firstProcedure.Title = "Прививка";
            firstProcedure.Cost = 15000;
            _repository.AddProcedure(firstProcedure);

            Schedule firstSchedule = new Schedule();
            firstSchedule.Date = DateTime.Now.AddDays(1).Date;
            firstSchedule.Doctor = _repository.GetDoctorByName("Викторов П.М.").ID;
            firstSchedule.Pet = _repository.GetPetnByName("Борис").ToList()[0].ID;
            //firstSchedule.Procedure = 1;
            firstSchedule.Title = "Плановый прием";
            firstSchedule.Text = "Сделать прививку";
            firstSchedule.Time = "10:30";
            _repository.AddSchedule(firstSchedule);




        }
 private void SavePet(Pet currentPet)
 {
     _repository.AddPet(currentPet);
 }