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(); }
/// <summary> /// Deprecated Method for adding a new object to the MapRefs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToMapRefs(MapRef mapRef) { base.AddObject("MapRefs", mapRef); }
/// <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; }
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(); }