Ejemplo n.º 1
0
        /// <summary>
        /// allows api posting of a review
        /// </summary>
        /// <param name="review"></param>
        /// <returns></returns>
        public async Task <ActionResult> AddReview(Review review)
        {
            await _context.Reviews.AddAsync(review);

            await _context.SaveChangesAsync();

            return(null);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// adds pet to the database
 /// </summary>
 /// <param name="Pet"></param>
 /// <returns></returns>
 public ActionResult AddPet(Pet Pet)
 {
     _context.Pets.Add(Pet);
     _context.SaveChangesAsync();
     return(null);
 }