public Int32 Insert() { DAL.SurveyResult Record = new DAL.SurveyResult { CreateDate = DateTime.Now, PortalID = this.PortalID }; this.context.AddToSurveyResults(Record); this.context.SaveChanges(); return Record.ResultID; }
/// <summary> /// Create a new SurveyResult object. /// </summary> /// <param name="resultID">Initial value of the ResultID property.</param> /// <param name="createDate">Initial value of the CreateDate property.</param> /// <param name="portalID">Initial value of the PortalID property.</param> public static SurveyResult CreateSurveyResult(global::System.Int32 resultID, global::System.DateTime createDate, global::System.Int32 portalID) { SurveyResult surveyResult = new SurveyResult(); surveyResult.ResultID = resultID; surveyResult.CreateDate = createDate; surveyResult.PortalID = portalID; return surveyResult; }
/// <summary> /// Deprecated Method for adding a new object to the SurveyResults EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSurveyResults(SurveyResult surveyResult) { base.AddObject("SurveyResults", surveyResult); }