public static Phenotype CreateNewPhenotype(string PhenotypeName, GeneticCounsellorDbContext context)
        {
            var p = new Phenotype();

            //derived from the traits and genotypes
            context.Phenotypes.Add(p);
            return(p);
        }
Ejemplo n.º 2
0
        public Phenotype AddPhenotype(string phenotypeName)
        {
            var p = new Phenotype();

            Db.Phenotypes.Add(p);
            Db.SaveChanges();
            return(p);
        }
Ejemplo n.º 3
0
        public Person AddPerson(string name, Sex sex, bool living, string phenotypeName)
        {
            var p = new Person();

            p.Name   = name;
            p.Sex    = sex;
            p.Living = living;
            var ph = new Phenotype();

            //derived from the traits and genotypes
            Db.Phenotypes.Add(ph);
            p.Phenotype = ph;

            Db.Persons.Add(p);

            Db.SaveChanges();
            return(p);
        }
Ejemplo n.º 4
0
 public void AddPhenotypeToPerson(Phenotype phenotype)
 {
     this.Phenotype = phenotype;
 }