public ActionResult AddColors(RabbitColor color)
        {
            try
            {
                db.RabbitColor.Add(color);

                db.SaveChanges();

                return(RedirectToAction("AddBreeds"));
            }
            catch
            {
                return(View());
            }
        }
예제 #2
0
 public Rabbit(RabbitColor color, int ears, bool tooManyPaws)
 {
     this.color       = color;
     this.ears        = ears;
     this.tooManyPaws = tooManyPaws;
 }