Beispiel #1
0
        public static ReviewStoragesVM SetSubData(ReviewStorages data, Guid aid)
        {
            var model = ReviewStoragesVM.MToVM(data);

            model.DateTime = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(data.DateTimeStorageID));
            return(model);
        }
Beispiel #2
0
 public static bool Insert(Guid id, Guid sid, Guid rid, Guid aid, string title, string comment, int stars, Guid dtsID, bool ia)
 {
     try {
         using (var context = new CentralProcessContext()) {
             var data = ReviewStoragesVM.set(id, sid, rid, aid, title, comment, stars, dtsID, ia);
             context.ReviewStoragesDB.Add(data);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }