public ActionResult CreateFeed(string title, string pointdatasourceid, string updated, string summary, string kml, string image, string region, string active)
 {
     try
     {
         var newfeed = new PointDataFeed()
         {
             Title = title,
             UpdatedOn = DateTime.Parse(updated),
             PointDataSourceId = long.Parse(pointdatasourceid),
             Summary = summary,
             KMLFeedUrl = kml,
             ImageUrl = image,
             IsRegion = bool.Parse(region),
             Active = bool.Parse(active),
             CreatedOn = DateTime.UtcNow,
             UniqueId = Guid.NewGuid().ToString()
         };
         newfeed.Save();
     }
     catch (Exception)
     {
         return Json("error", JsonRequestBehavior.AllowGet);
     }
     return Json("success", JsonRequestBehavior.AllowGet);
 }
Beispiel #2
0
 public static void Setup(int testItems)
 {
     SetTestRepo();
     for(int i=0;i<testItems;i++){
         PointDataFeed item=new PointDataFeed();
         _testRepo._items.Add(item);
     }
 }
Beispiel #3
0
 public static void Setup(PointDataFeed item)
 {
     SetTestRepo();
     _testRepo._items.Add(item);
 }