コード例 #1
0
 public ActionResult AddMeta(Metadata metaData)
 {
     if (ModelState.IsValid)
     {
         repository.AddMetadata(metaData);
         ViewBag.ClubId = metaData.ClubID;
         return View("AddMeta");
     }
     else
     {
         ViewBag.ClubId = "Error";
         return View("AddMeta");
     }
 }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Metadatas EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMetadatas(Metadata metadata)
 {
     base.AddObject("Metadatas", metadata);
 }
コード例 #3
0
 /// <summary>
 /// Create a new Metadata object.
 /// </summary>
 /// <param name="metadataID">Initial value of the MetadataID property.</param>
 /// <param name="metadataType">Initial value of the MetadataType property.</param>
 /// <param name="metadataValue">Initial value of the MetadataValue property.</param>
 /// <param name="clubID">Initial value of the ClubID property.</param>
 public static Metadata CreateMetadata(global::System.Int32 metadataID, global::System.String metadataType, global::System.String metadataValue, global::System.Int32 clubID)
 {
     Metadata metadata = new Metadata();
     metadata.MetadataID = metadataID;
     metadata.MetadataType = metadataType;
     metadata.MetadataValue = metadataValue;
     metadata.ClubID = clubID;
     return metadata;
 }
コード例 #4
0
 public Int32 AddMetadata(Metadata metaData)
 {
     entities.Metadatas.AddObject(metaData);
     entities.SaveChanges();
     return metaData.MetadataID;
 }