Example #1
0
        public bool CreateEatery(EateryCreate model)
        {
            Eatery food = new Eatery
            {
                Name        = model.Name,
                CuisineType = model.CuisineType,
                DineIn      = model.DineIn,
                Tier        = model.Tier,
                AreaId      = model.AreaId
            };

            using (var fd = new ApplicationDbContext())
            {
                fd.Eateries.Add(food);
                return(fd.SaveChanges() == 1);
            }
        }
Example #2
0
 public int Compute(Eatery f)
 {
     return(f.SeatingCapacity * 100 + 1000);
 }
Example #3
0
 public int Compute(Eatery f)
 {
     return(f.SeatingCapacity * 25);
 }