예제 #1
0
        public bool UpdateMap(MapFetch model)
        {
            using (var ctx = new ApplicationDbContext())
            {
                var entity =
                    ctx
                    .Map.Where(e => e.OwnerID == _userID)
                    .Single();

                entity.PlanetData = model.Planets;
                return(ctx.SaveChanges() == 1);
            }
        }
예제 #2
0
 public HolderModel(Guid ID)
 {
     guid = ID;
     map  = new MapService(ID).GetMapByID(ID);
     days = new DayCommentService(ID).FetchUserComments();
 }