Пример #1
0
        void IPaleontologistRepository.SetLoggedIn(int Id, bool loggedIn)
        {
            Paleontologist paleontologist = context.Paleontologists.Find(Id);

            paleontologist.LoggedIn = loggedIn;
            context.Paleontologists.Update(paleontologist);
            context.SaveChanges();
            context.Entry(paleontologist).State = EntityState.Detached;
        }
Пример #2
0
        void IResearcherRepository.CreateResearcher(string name)
        {
            Researcher researcher = new Researcher(name);

            context.Researchers.Add(researcher);
            context.SaveChanges();
            context.Entry(researcher).State = EntityState.Detached;
        }