public static Dog ToDog(this DogTableEntity dog)
 {
     return(new Dog()
     {
         Id = dog.RowKey,
         CreatedTime = dog.CreatedTime,
         Name = dog.Name,
         Breed = dog.Breed,
         Age = dog.Age,
         Sex = dog.Sex
     });
 }
        public static async Task <IActionResult> GetDogById(
            [HttpTrigger(AuthorizationLevel.Function, "get", Route = "dogs/{id}")] HttpRequest req,
            [Table("dogs", "DOG", "{id}", Connection = "AzureWebJobsStorage")] DogTableEntity dog,
            ILogger log,
            string id)
        {
            log.LogInformation("Starting GetDogById function...");

            if (dog == null)
            {
                log.LogInformation($"Dog {id} not found");
                return(new NotFoundResult());
            }

            return(new OkObjectResult(dog));
        }