示例#1
0
        public static int AddMapReference(int SpeciesId, int MapX, int MapY, string Notes)
        {
            MapRef m = new MapRef();
            m.MapId = DataAccessLayer.MapRefs.NextId(f => f.MapId);
            m.SpeciesId = SpeciesId;
            m.MapX = MapX;
            m.MapY = MapY;
            m.Notes = Notes;

            DataAccessLayer.AddToMapRefs(m);
            return DataAccessLayer.SaveChanges();
        }
示例#2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the MapRefs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMapRefs(MapRef mapRef)
 {
     base.AddObject("MapRefs", mapRef);
 }
示例#3
0
 /// <summary>
 /// Create a new MapRef object.
 /// </summary>
 /// <param name="mapId">Initial value of the MapId property.</param>
 public static MapRef CreateMapRef(global::System.Int32 mapId)
 {
     MapRef mapRef = new MapRef();
     mapRef.MapId = mapId;
     return mapRef;
 }
示例#4
0
        public static int SaveMapReference(int MapReference, string Notes)
        {
            MapRef m = new MapRef();

            var mapo = from x in DataAccessLayer.MapRefs
                       where x.MapId == MapReference
                       select x;
            m = mapo.ToList()[0];
            m.Notes = Notes;
            return DataAccessLayer.SaveChanges();
        }