Example #1
0
 /// <summary>
 /// Adds shrub in database.
 /// </summary>
 /// <param name="shrub">the shrub that will be added</param>
 public void Add(Shrub shrub)
 {
     context.Shrubs.Add(shrub);
     context.SaveChanges();
 }
Example #2
0
 /// <summary>
 /// Adds Grass in database.
 /// </summary>
 /// <param name="grass">the grass that will be added</param>
 public void Add(Grass grass)
 {
     context.Grasses.Add(grass);
     context.SaveChanges();
 }
Example #3
0
 /// <summary>
 /// Adds flower in database.
 /// </summary>
 /// <param name="flower">the flower that will be added</param>
 public void Add(Flower flower)
 {
     context.Flowers.Add(flower);
     context.SaveChanges();
 }
Example #4
0
 /// <summary>
 /// Adds tree in database.
 /// </summary>
 /// <param name="tree">the tree that will be added</param>
 public void Add(Tree tree)
 {
     context.Trees.Add(tree);
     context.SaveChanges();
 }
 /// <summary>
 /// Adds cactus in database.
 /// </summary>
 /// <param name="cactus">the cactus that will be added</param>
 public void Add(Cactus cactus)
 {
     context.Cactuses.Add(cactus);
     context.SaveChanges();
 }