Beispiel #1
0
 public static void ProcessQueueMsg([QueueTrigger(PICTURE_LOADER_QUEUE_NAME)] Picture picture)
 {
     if (Uri.IsWellFormedUriString(picture.PictureUrl, UriKind.Absolute))
     {
         Pictures picturesDB = new Pictures();
         picturesDB.PictureEntities.Add(picture);
         picturesDB.SaveChanges();
     }
     else
     {
         // Perform some compensating action here...
         Console.WriteLine("Picture Url '{0}' is invalid.");
     }
 }
 public ActionResult Index()
 {
     Pictures picturesDB = new Pictures();
     var pics = picturesDB.PictureEntities.ToList();
     return View(pics);
 }