public static Phenotype CreateNewPhenotype(string PhenotypeName, GeneticCounsellorDbContext context) { var p = new Phenotype(); //derived from the traits and genotypes context.Phenotypes.Add(p); return(p); }
public Phenotype AddPhenotype(string phenotypeName) { var p = new Phenotype(); Db.Phenotypes.Add(p); Db.SaveChanges(); return(p); }
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); }
public void AddPhenotypeToPerson(Phenotype phenotype) { this.Phenotype = phenotype; }