示例#1
0
        static public bool Create(T_Location location)
        {

            using (ConcertFinderEntities bdd = new ConcertFinderEntities())
            {
                try
                {
                    bdd.AddToT_Location (location);
                    bdd.SaveChanges();
                }
                catch (Exception)
                {
                    return false;
                }
            }
            return true;
        }
示例#2
0
 static public bool Update(T_Location location)
 {
     using (ConcertFinderEntities bdd = new ConcertFinderEntities())
     {
         try
         {
             var n_location = new T_Location { Id = location.Id };
             bdd.T_Location.Attach(n_location);
             bdd.ApplyCurrentValues("T_Location", location);
             bdd.SaveChanges();
         }
         catch (Exception)
         {
             return false;
         }
     }
     return true;
 }
 /// <summary>
 /// Create a new T_Location object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="ville">Initial value of the Ville property.</param>
 /// <param name="pays">Initial value of the Pays property.</param>
 /// <param name="rue">Initial value of the Rue property.</param>
 /// <param name="cP">Initial value of the CP property.</param>
 /// <param name="latitude">Initial value of the Latitude property.</param>
 /// <param name="longitude">Initial value of the Longitude property.</param>
 public static T_Location CreateT_Location(global::System.Int64 id, global::System.String name, global::System.String ville, global::System.String pays, global::System.String rue, global::System.String cP, global::System.Double latitude, global::System.Double longitude)
 {
     T_Location t_Location = new T_Location();
     t_Location.Id = id;
     t_Location.Name = name;
     t_Location.Ville = ville;
     t_Location.Pays = pays;
     t_Location.Rue = rue;
     t_Location.CP = cP;
     t_Location.Latitude = latitude;
     t_Location.Longitude = longitude;
     return t_Location;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the T_Location EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToT_Location(T_Location t_Location)
 {
     base.AddObject("T_Location", t_Location);
 }