Ejemplo n.º 1
0
 public static Map ToMap(Maps dbMap)
 {
     return new Map
         {
             Id = dbMap.Id,
             Name = dbMap.Name
         };
 }
Ejemplo n.º 2
0
        public static Map CreateMap(MapsEntities entities, string mapName)
        {
            var newMap = new Maps
                {
                    Name = mapName,
                    CreationTime = DateTime.Now
                };
            Maps insertedMap = entities.Maps.Add(newMap);
            entities.SaveChanges();

            StudMapCache.Global.UpdateMaps(entities);

            return Conversions.ToMap(insertedMap);
        }