コード例 #1
0
 public async Task <JsonResult> GetByID(string id, string iid)
 {
     try {
         var data = IS_ItemImageService.GetByID(Guid.Parse(id), Guid.Parse(iid));
         return(Success(IS_ItemImagesVM.MToVM(data)));
     } catch { return(Failed(MessageUtility.ServerError())); }
 }
コード例 #2
0
 public static bool Insert(Guid id, string source, Guid itemID)
 {
     try {
         using (var context = new GeopersonContext()) {
             var model = IS_ItemImagesVM.Set(id, source, itemID);
             context.IS_ItemImagesDB.Add(model);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }