// POST api/<controller> public void Post(YouTubeWebApi value) { var db = new AdventureDbContainer(); db.YouTubeWebApi.AddObject(new YouTubeWebApi { Name = value.Name, Department = value.Department }); db.SaveChanges(); }
/// <summary> /// Create a new YouTubeWebApi object. /// </summary> /// <param name="rowId">Initial value of the RowId property.</param> /// <param name="name">Initial value of the Name property.</param> public static YouTubeWebApi CreateYouTubeWebApi(global::System.Int32 rowId, global::System.String name) { YouTubeWebApi youTubeWebApi = new YouTubeWebApi(); youTubeWebApi.RowId = rowId; youTubeWebApi.Name = name; return youTubeWebApi; }
/// <summary> /// Deprecated Method for adding a new object to the YouTubeWebApi EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToYouTubeWebApi(YouTubeWebApi youTubeWebApi) { base.AddObject("YouTubeWebApi", youTubeWebApi); }