//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;
[assembly: EdmSchemaAttribute()]
#region EDM Relationship Metadata
[assembly: EdmRelationshipAttribute("YouGradeModel", "FK_Alternative_QuestionDef", "QuestionDef", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(YouGrade.Model.QuestionDef), "Alternative", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(YouGrade.Model.Alternative), true)]
[assembly: EdmRelationshipAttribute("YouGradeModel", "FK_Answer_Alternative", "Alternative", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(YouGrade.Model.Alternative), "Answer", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(YouGrade.Model.Answer), true)]
[assembly: EdmRelationshipAttribute("YouGradeModel", "FK_Answer_ExamTake", "ExamTake", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(YouGrade.Model.ExamTake), "Answer", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(YouGrade.Model.Answer), true)]
[assembly: EdmRelationshipAttribute("YouGradeModel", "FK_ExamTake_ExamDef", "ExamDef", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(YouGrade.Model.ExamDef), "ExamTake", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(YouGrade.Model.ExamTake), true)]
[assembly: EdmRelationshipAttribute("YouGradeModel", "FK_QuestionDef_ExamDef", "ExamDef", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(YouGrade.Model.ExamDef), "QuestionDef", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(YouGrade.Model.QuestionDef), true)]
[assembly: EdmRelationshipAttribute("YouGradeModel", "FK_ExamTake_User", "User", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(YouGrade.Model.User), "ExamTake", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(YouGrade.Model.ExamTake), true)]
#endregion
namespace YouGrade.Model
{
#region Contexts
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public partial class YouGradeEntities1 : ObjectContext
{
#region Constructors
/// <summary>
/// Initializes a new YouGradeEntities2 object using the connection string found in the 'YouGradeEntities2' section of the application configuration file.
/// </summary>
public YouGradeEntities1() : base("name=YouGradeEntities2", "YouGradeEntities2")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
/// <summary>
/// Initialize a new YouGradeEntities2 object.
/// </summary>
public YouGradeEntities1(string connectionString) : base(connectionString, "YouGradeEntities2")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
/// <summary>
/// Initialize a new YouGradeEntities2 object.
/// </summary>
public YouGradeEntities1(EntityConnection connection) : base(connection, "YouGradeEntities2")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
#endregion
#region Partial Methods
partial void OnContextCreated();
#endregion
#region ObjectSet Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<Alternative> Alternative
{
get
{
if ((_Alternative == null))
{
_Alternative = base.CreateObjectSet<Alternative>("Alternative");
}
return _Alternative;
}
}
private ObjectSet<Alternative> _Alternative;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<Answer> Answer
{
get
{
if ((_Answer == null))
{
_Answer = base.CreateObjectSet<Answer>("Answer");
}
return _Answer;
}
}
private ObjectSet<Answer> _Answer;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<ExamDef> ExamDef
{
get
{
if ((_ExamDef == null))
{
_ExamDef = base.CreateObjectSet<ExamDef>("ExamDef");
}
return _ExamDef;
}
}
private ObjectSet<ExamDef> _ExamDef;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<ExamTake> ExamTake
{
get
{
if ((_ExamTake == null))
{
_ExamTake = base.CreateObjectSet<ExamTake>("ExamTake");
}
return _ExamTake;
}
}
private ObjectSet<ExamTake> _ExamTake;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<QuestionDef> QuestionDef
{
get
{
if ((_QuestionDef == null))
{
_QuestionDef = base.CreateObjectSet<QuestionDef>("QuestionDef");
}
return _QuestionDef;
}
}
private ObjectSet<QuestionDef> _QuestionDef;
/// <summary>
/// No Metadata Documentation available.
/// </summary>
public ObjectSet<User> User
{
get
{
if ((_User == null))
{
_User = base.CreateObjectSet<User>("User");
}
return _User;
}
}
private ObjectSet<User> _User;
#endregion
#region AddTo Methods
/// <summary>
/// Deprecated Method for adding a new object to the Alternative EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToAlternative(Alternative alternative)
{
base.AddObject("Alternative", alternative);
}
/// <summary>
/// Deprecated Method for adding a new object to the Answer EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToAnswer(Answer answer)
{
base.AddObject("Answer", answer);
}
/// <summary>
/// Deprecated Method for adding a new object to the ExamDef EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToExamDef(ExamDef examDef)
{
base.AddObject("ExamDef", examDef);
}
/// <summary>
/// Deprecated Method for adding a new object to the ExamTake EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToExamTake(ExamTake examTake)
{
base.AddObject("ExamTake", examTake);
}
/// <summary>
/// Deprecated Method for adding a new object to the QuestionDef EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToQuestionDef(QuestionDef questionDef)
{
base.AddObject("QuestionDef", questionDef);
}
/// <summary>
/// Deprecated Method for adding a new object to the User EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
/// </summary>
public void AddToUser(User user)
{
base.AddObject("User", user);
}
#endregion
}
#endregion
#region Entities
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmEntityTypeAttribute(NamespaceName="YouGradeModel", Name="Alternative")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class Alternative : EntityObject
{
#region Factory Method
/// <summary>
/// Create a new Alternative object.
/// </summary>
/// <param name="questionId">Initial value of the QuestionId property.</param>
/// <param name="id">Initial value of the Id property.</param>
/// <param name="text">Initial value of the Text property.</param>
/// <param name="correct">Initial value of the Correct property.</param>
public static Alternative CreateAlternative(global::System.Int32 questionId, global::System.String id, global::System.String text, global::System.Boolean correct)
{
Alternative alternative = new Alternative();
alternative.QuestionId = questionId;
alternative.Id = id;
alternative.Text = text;
alternative.Correct = correct;
return alternative;
}
#endregion
#region Primitive Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 QuestionId
{
get
{
return _QuestionId;
}
set
{
if (_QuestionId != value)
{
OnQuestionIdChanging(value);
ReportPropertyChanging("QuestionId");
_QuestionId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("QuestionId");
OnQuestionIdChanged();
}
}
}
private global::System.Int32 _QuestionId;
partial void OnQuestionIdChanging(global::System.Int32 value);
partial void OnQuestionIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Id
{
get
{
return _Id;
}
set
{
if (_Id != value)
{
OnIdChanging(value);
ReportPropertyChanging("Id");
_Id = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Id");
OnIdChanged();
}
}
}
private global::System.String _Id;
partial void OnIdChanging(global::System.String value);
partial void OnIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Text
{
get
{
return _Text;
}
set
{
OnTextChanging(value);
ReportPropertyChanging("Text");
_Text = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Text");
OnTextChanged();
}
}
private global::System.String _Text;
partial void OnTextChanging(global::System.String value);
partial void OnTextChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Boolean Correct
{
get
{
return _Correct;
}
set
{
OnCorrectChanging(value);
ReportPropertyChanging("Correct");
_Correct = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Correct");
OnCorrectChanged();
}
}
private global::System.Boolean _Correct;
partial void OnCorrectChanging(global::System.Boolean value);
partial void OnCorrectChanged();
#endregion
#region Navigation Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_Alternative_QuestionDef", "QuestionDef")]
public QuestionDef QuestionDef
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<QuestionDef>("YouGradeModel.FK_Alternative_QuestionDef", "QuestionDef").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<QuestionDef>("YouGradeModel.FK_Alternative_QuestionDef", "QuestionDef").Value = value;
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference<QuestionDef> QuestionDefReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<QuestionDef>("YouGradeModel.FK_Alternative_QuestionDef", "QuestionDef");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<QuestionDef>("YouGradeModel.FK_Alternative_QuestionDef", "QuestionDef", value);
}
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_Answer_Alternative", "Answer")]
public EntityCollection<Answer> Answer
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Answer>("YouGradeModel.FK_Answer_Alternative", "Answer");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Answer>("YouGradeModel.FK_Answer_Alternative", "Answer", value);
}
}
}
#endregion
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmEntityTypeAttribute(NamespaceName="YouGradeModel", Name="Answer")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class Answer : EntityObject
{
#region Factory Method
/// <summary>
/// Create a new Answer object.
/// </summary>
/// <param name="examTakeId">Initial value of the ExamTakeId property.</param>
/// <param name="questionId">Initial value of the QuestionId property.</param>
/// <param name="alternativeId">Initial value of the AlternativeId property.</param>
/// <param name="isChecked">Initial value of the IsChecked property.</param>
public static Answer CreateAnswer(global::System.Int32 examTakeId, global::System.Int32 questionId, global::System.String alternativeId, global::System.Boolean isChecked)
{
Answer answer = new Answer();
answer.ExamTakeId = examTakeId;
answer.QuestionId = questionId;
answer.AlternativeId = alternativeId;
answer.IsChecked = isChecked;
return answer;
}
#endregion
#region Primitive Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 ExamTakeId
{
get
{
return _ExamTakeId;
}
set
{
if (_ExamTakeId != value)
{
OnExamTakeIdChanging(value);
ReportPropertyChanging("ExamTakeId");
_ExamTakeId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("ExamTakeId");
OnExamTakeIdChanged();
}
}
}
private global::System.Int32 _ExamTakeId;
partial void OnExamTakeIdChanging(global::System.Int32 value);
partial void OnExamTakeIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 QuestionId
{
get
{
return _QuestionId;
}
set
{
if (_QuestionId != value)
{
OnQuestionIdChanging(value);
ReportPropertyChanging("QuestionId");
_QuestionId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("QuestionId");
OnQuestionIdChanged();
}
}
}
private global::System.Int32 _QuestionId;
partial void OnQuestionIdChanging(global::System.Int32 value);
partial void OnQuestionIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String AlternativeId
{
get
{
return _AlternativeId;
}
set
{
if (_AlternativeId != value)
{
OnAlternativeIdChanging(value);
ReportPropertyChanging("AlternativeId");
_AlternativeId = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("AlternativeId");
OnAlternativeIdChanged();
}
}
}
private global::System.String _AlternativeId;
partial void OnAlternativeIdChanging(global::System.String value);
partial void OnAlternativeIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Boolean IsChecked
{
get
{
return _IsChecked;
}
set
{
OnIsCheckedChanging(value);
ReportPropertyChanging("IsChecked");
_IsChecked = StructuralObject.SetValidValue(value);
ReportPropertyChanged("IsChecked");
OnIsCheckedChanged();
}
}
private global::System.Boolean _IsChecked;
partial void OnIsCheckedChanging(global::System.Boolean value);
partial void OnIsCheckedChanged();
#endregion
#region Navigation Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_Answer_Alternative", "Alternative")]
public Alternative Alternative
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Alternative>("YouGradeModel.FK_Answer_Alternative", "Alternative").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Alternative>("YouGradeModel.FK_Answer_Alternative", "Alternative").Value = value;
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference<Alternative> AlternativeReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Alternative>("YouGradeModel.FK_Answer_Alternative", "Alternative");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Alternative>("YouGradeModel.FK_Answer_Alternative", "Alternative", value);
}
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_Answer_ExamTake", "ExamTake")]
public ExamTake ExamTake
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamTake>("YouGradeModel.FK_Answer_ExamTake", "ExamTake").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamTake>("YouGradeModel.FK_Answer_ExamTake", "ExamTake").Value = value;
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference<ExamTake> ExamTakeReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamTake>("YouGradeModel.FK_Answer_ExamTake", "ExamTake");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<ExamTake>("YouGradeModel.FK_Answer_ExamTake", "ExamTake", value);
}
}
}
#endregion
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmEntityTypeAttribute(NamespaceName="YouGradeModel", Name="ExamDef")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class ExamDef : EntityObject
{
#region Factory Method
/// <summary>
/// Create a new ExamDef object.
/// </summary>
/// <param name="id">Initial value of the Id property.</param>
/// <param name="name">Initial value of the Name property.</param>
/// <param name="description">Initial value of the Description property.</param>
/// <param name="minimumOfCorrectAnswers">Initial value of the MinimumOfCorrectAnswers property.</param>
/// <param name="duration">Initial value of the Duration property.</param>
public static ExamDef CreateExamDef(global::System.Int32 id, global::System.String name, global::System.String description, global::System.Int32 minimumOfCorrectAnswers, global::System.TimeSpan duration)
{
ExamDef examDef = new ExamDef();
examDef.Id = id;
examDef.Name = name;
examDef.Description = description;
examDef.MinimumOfCorrectAnswers = minimumOfCorrectAnswers;
examDef.Duration = duration;
return examDef;
}
#endregion
#region Primitive Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 Id
{
get
{
return _Id;
}
set
{
if (_Id != value)
{
OnIdChanging(value);
ReportPropertyChanging("Id");
_Id = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Id");
OnIdChanged();
}
}
}
private global::System.Int32 _Id;
partial void OnIdChanging(global::System.Int32 value);
partial void OnIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Name
{
get
{
return _Name;
}
set
{
OnNameChanging(value);
ReportPropertyChanging("Name");
_Name = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Name");
OnNameChanged();
}
}
private global::System.String _Name;
partial void OnNameChanging(global::System.String value);
partial void OnNameChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Description
{
get
{
return _Description;
}
set
{
OnDescriptionChanging(value);
ReportPropertyChanging("Description");
_Description = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Description");
OnDescriptionChanged();
}
}
private global::System.String _Description;
partial void OnDescriptionChanging(global::System.String value);
partial void OnDescriptionChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 MinimumOfCorrectAnswers
{
get
{
return _MinimumOfCorrectAnswers;
}
set
{
OnMinimumOfCorrectAnswersChanging(value);
ReportPropertyChanging("MinimumOfCorrectAnswers");
_MinimumOfCorrectAnswers = StructuralObject.SetValidValue(value);
ReportPropertyChanged("MinimumOfCorrectAnswers");
OnMinimumOfCorrectAnswersChanged();
}
}
private global::System.Int32 _MinimumOfCorrectAnswers;
partial void OnMinimumOfCorrectAnswersChanging(global::System.Int32 value);
partial void OnMinimumOfCorrectAnswersChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.TimeSpan Duration
{
get
{
return _Duration;
}
set
{
OnDurationChanging(value);
ReportPropertyChanging("Duration");
_Duration = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Duration");
OnDurationChanged();
}
}
private global::System.TimeSpan _Duration;
partial void OnDurationChanging(global::System.TimeSpan value);
partial void OnDurationChanged();
#endregion
#region Navigation Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_ExamTake_ExamDef", "ExamTake")]
public EntityCollection<ExamTake> ExamTake
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<ExamTake>("YouGradeModel.FK_ExamTake_ExamDef", "ExamTake");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<ExamTake>("YouGradeModel.FK_ExamTake_ExamDef", "ExamTake", value);
}
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_QuestionDef_ExamDef", "QuestionDef")]
public EntityCollection<QuestionDef> QuestionDef
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<QuestionDef>("YouGradeModel.FK_QuestionDef_ExamDef", "QuestionDef");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<QuestionDef>("YouGradeModel.FK_QuestionDef_ExamDef", "QuestionDef", value);
}
}
}
#endregion
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmEntityTypeAttribute(NamespaceName="YouGradeModel", Name="ExamTake")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class ExamTake : EntityObject
{
#region Factory Method
/// <summary>
/// Create a new ExamTake object.
/// </summary>
/// <param name="id">Initial value of the Id property.</param>
/// <param name="examId">Initial value of the ExamId property.</param>
/// <param name="userId">Initial value of the UserId property.</param>
/// <param name="startDateTime">Initial value of the StartDateTime property.</param>
/// <param name="duration">Initial value of the Duration property.</param>
/// <param name="grade">Initial value of the Grade property.</param>
/// <param name="status">Initial value of the Status property.</param>
public static ExamTake CreateExamTake(global::System.Int32 id, global::System.Int32 examId, global::System.Int32 userId, global::System.DateTime startDateTime, global::System.TimeSpan duration, global::System.Int32 grade, global::System.String status)
{
ExamTake examTake = new ExamTake();
examTake.Id = id;
examTake.ExamId = examId;
examTake.UserId = userId;
examTake.StartDateTime = startDateTime;
examTake.Duration = duration;
examTake.Grade = grade;
examTake.Status = status;
return examTake;
}
#endregion
#region Primitive Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 Id
{
get
{
return _Id;
}
set
{
if (_Id != value)
{
OnIdChanging(value);
ReportPropertyChanging("Id");
_Id = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Id");
OnIdChanged();
}
}
}
private global::System.Int32 _Id;
partial void OnIdChanging(global::System.Int32 value);
partial void OnIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 ExamId
{
get
{
return _ExamId;
}
set
{
OnExamIdChanging(value);
ReportPropertyChanging("ExamId");
_ExamId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("ExamId");
OnExamIdChanged();
}
}
private global::System.Int32 _ExamId;
partial void OnExamIdChanging(global::System.Int32 value);
partial void OnExamIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 UserId
{
get
{
return _UserId;
}
set
{
OnUserIdChanging(value);
ReportPropertyChanging("UserId");
_UserId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("UserId");
OnUserIdChanged();
}
}
private global::System.Int32 _UserId;
partial void OnUserIdChanging(global::System.Int32 value);
partial void OnUserIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime StartDateTime
{
get
{
return _StartDateTime;
}
set
{
OnStartDateTimeChanging(value);
ReportPropertyChanging("StartDateTime");
_StartDateTime = StructuralObject.SetValidValue(value);
ReportPropertyChanged("StartDateTime");
OnStartDateTimeChanged();
}
}
private global::System.DateTime _StartDateTime;
partial void OnStartDateTimeChanging(global::System.DateTime value);
partial void OnStartDateTimeChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.TimeSpan Duration
{
get
{
return _Duration;
}
set
{
OnDurationChanging(value);
ReportPropertyChanging("Duration");
_Duration = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Duration");
OnDurationChanged();
}
}
private global::System.TimeSpan _Duration;
partial void OnDurationChanging(global::System.TimeSpan value);
partial void OnDurationChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 Grade
{
get
{
return _Grade;
}
set
{
OnGradeChanging(value);
ReportPropertyChanging("Grade");
_Grade = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Grade");
OnGradeChanged();
}
}
private global::System.Int32 _Grade;
partial void OnGradeChanging(global::System.Int32 value);
partial void OnGradeChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Status
{
get
{
return _Status;
}
set
{
OnStatusChanging(value);
ReportPropertyChanging("Status");
_Status = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Status");
OnStatusChanged();
}
}
private global::System.String _Status;
partial void OnStatusChanging(global::System.String value);
partial void OnStatusChanged();
#endregion
#region Navigation Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_Answer_ExamTake", "Answer")]
public EntityCollection<Answer> Answer
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Answer>("YouGradeModel.FK_Answer_ExamTake", "Answer");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Answer>("YouGradeModel.FK_Answer_ExamTake", "Answer", value);
}
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_ExamTake_ExamDef", "ExamDef")]
public ExamDef ExamDef
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamDef>("YouGradeModel.FK_ExamTake_ExamDef", "ExamDef").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamDef>("YouGradeModel.FK_ExamTake_ExamDef", "ExamDef").Value = value;
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference<ExamDef> ExamDefReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamDef>("YouGradeModel.FK_ExamTake_ExamDef", "ExamDef");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<ExamDef>("YouGradeModel.FK_ExamTake_ExamDef", "ExamDef", value);
}
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_ExamTake_User", "User")]
public User User
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("YouGradeModel.FK_ExamTake_User", "User").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("YouGradeModel.FK_ExamTake_User", "User").Value = value;
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference<User> UserReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("YouGradeModel.FK_ExamTake_User", "User");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<User>("YouGradeModel.FK_ExamTake_User", "User", value);
}
}
}
#endregion
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmEntityTypeAttribute(NamespaceName="YouGradeModel", Name="QuestionDef")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class QuestionDef : EntityObject
{
#region Factory Method
/// <summary>
/// Create a new QuestionDef object.
/// </summary>
/// <param name="id">Initial value of the Id property.</param>
/// <param name="examId">Initial value of the ExamId property.</param>
/// <param name="text">Initial value of the Text property.</param>
/// <param name="url">Initial value of the Url property.</param>
/// <param name="explanation">Initial value of the Explanation property.</param>
/// <param name="mark">Initial value of the Mark property.</param>
/// <param name="isMultiSelect">Initial value of the IsMultiSelect property.</param>
/// <param name="startSeconds">Initial value of the StartSeconds property.</param>
public static QuestionDef CreateQuestionDef(global::System.Int32 id, global::System.Int32 examId, global::System.String text, global::System.String url, global::System.String explanation, global::System.String mark, global::System.Boolean isMultiSelect, global::System.Int32 startSeconds)
{
QuestionDef questionDef = new QuestionDef();
questionDef.Id = id;
questionDef.ExamId = examId;
questionDef.Text = text;
questionDef.Url = url;
questionDef.Explanation = explanation;
questionDef.Mark = mark;
questionDef.IsMultiSelect = isMultiSelect;
questionDef.StartSeconds = startSeconds;
return questionDef;
}
#endregion
#region Primitive Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 Id
{
get
{
return _Id;
}
set
{
if (_Id != value)
{
OnIdChanging(value);
ReportPropertyChanging("Id");
_Id = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Id");
OnIdChanged();
}
}
}
private global::System.Int32 _Id;
partial void OnIdChanging(global::System.Int32 value);
partial void OnIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 ExamId
{
get
{
return _ExamId;
}
set
{
OnExamIdChanging(value);
ReportPropertyChanging("ExamId");
_ExamId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("ExamId");
OnExamIdChanged();
}
}
private global::System.Int32 _ExamId;
partial void OnExamIdChanging(global::System.Int32 value);
partial void OnExamIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Text
{
get
{
return _Text;
}
set
{
OnTextChanging(value);
ReportPropertyChanging("Text");
_Text = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Text");
OnTextChanged();
}
}
private global::System.String _Text;
partial void OnTextChanging(global::System.String value);
partial void OnTextChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Url
{
get
{
return _Url;
}
set
{
OnUrlChanging(value);
ReportPropertyChanging("Url");
_Url = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Url");
OnUrlChanged();
}
}
private global::System.String _Url;
partial void OnUrlChanging(global::System.String value);
partial void OnUrlChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Explanation
{
get
{
return _Explanation;
}
set
{
OnExplanationChanging(value);
ReportPropertyChanging("Explanation");
_Explanation = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Explanation");
OnExplanationChanged();
}
}
private global::System.String _Explanation;
partial void OnExplanationChanging(global::System.String value);
partial void OnExplanationChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Mark
{
get
{
return _Mark;
}
set
{
OnMarkChanging(value);
ReportPropertyChanging("Mark");
_Mark = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Mark");
OnMarkChanged();
}
}
private global::System.String _Mark;
partial void OnMarkChanging(global::System.String value);
partial void OnMarkChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Boolean IsMultiSelect
{
get
{
return _IsMultiSelect;
}
set
{
OnIsMultiSelectChanging(value);
ReportPropertyChanging("IsMultiSelect");
_IsMultiSelect = StructuralObject.SetValidValue(value);
ReportPropertyChanged("IsMultiSelect");
OnIsMultiSelectChanged();
}
}
private global::System.Boolean _IsMultiSelect;
partial void OnIsMultiSelectChanging(global::System.Boolean value);
partial void OnIsMultiSelectChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 StartSeconds
{
get
{
return _StartSeconds;
}
set
{
OnStartSecondsChanging(value);
ReportPropertyChanging("StartSeconds");
_StartSeconds = StructuralObject.SetValidValue(value);
ReportPropertyChanged("StartSeconds");
OnStartSecondsChanged();
}
}
private global::System.Int32 _StartSeconds;
partial void OnStartSecondsChanging(global::System.Int32 value);
partial void OnStartSecondsChanged();
#endregion
#region Navigation Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_Alternative_QuestionDef", "Alternative")]
public EntityCollection<Alternative> Alternative
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Alternative>("YouGradeModel.FK_Alternative_QuestionDef", "Alternative");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Alternative>("YouGradeModel.FK_Alternative_QuestionDef", "Alternative", value);
}
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_QuestionDef_ExamDef", "ExamDef")]
public ExamDef ExamDef
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamDef>("YouGradeModel.FK_QuestionDef_ExamDef", "ExamDef").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamDef>("YouGradeModel.FK_QuestionDef_ExamDef", "ExamDef").Value = value;
}
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference<ExamDef> ExamDefReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<ExamDef>("YouGradeModel.FK_QuestionDef_ExamDef", "ExamDef");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<ExamDef>("YouGradeModel.FK_QuestionDef_ExamDef", "ExamDef", value);
}
}
}
#endregion
}
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmEntityTypeAttribute(NamespaceName="YouGradeModel", Name="User")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class User : EntityObject
{
#region Factory Method
/// <summary>
/// Create a new User object.
/// </summary>
/// <param name="id">Initial value of the Id property.</param>
/// <param name="login">Initial value of the Login property.</param>
/// <param name="password">Initial value of the Password property.</param>
/// <param name="firstname">Initial value of the Firstname property.</param>
/// <param name="lastname">Initial value of the Lastname property.</param>
public static User CreateUser(global::System.Int32 id, global::System.String login, global::System.String password, global::System.String firstname, global::System.String lastname)
{
User user = new User();
user.Id = id;
user.Login = login;
user.Password = password;
user.Firstname = firstname;
user.Lastname = lastname;
return user;
}
#endregion
#region Primitive Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 Id
{
get
{
return _Id;
}
set
{
if (_Id != value)
{
OnIdChanging(value);
ReportPropertyChanging("Id");
_Id = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Id");
OnIdChanged();
}
}
}
private global::System.Int32 _Id;
partial void OnIdChanging(global::System.Int32 value);
partial void OnIdChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Login
{
get
{
return _Login;
}
set
{
OnLoginChanging(value);
ReportPropertyChanging("Login");
_Login = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Login");
OnLoginChanged();
}
}
private global::System.String _Login;
partial void OnLoginChanging(global::System.String value);
partial void OnLoginChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Password
{
get
{
return _Password;
}
set
{
OnPasswordChanging(value);
ReportPropertyChanging("Password");
_Password = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Password");
OnPasswordChanged();
}
}
private global::System.String _Password;
partial void OnPasswordChanging(global::System.String value);
partial void OnPasswordChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Firstname
{
get
{
return _Firstname;
}
set
{
OnFirstnameChanging(value);
ReportPropertyChanging("Firstname");
_Firstname = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Firstname");
OnFirstnameChanged();
}
}
private global::System.String _Firstname;
partial void OnFirstnameChanging(global::System.String value);
partial void OnFirstnameChanged();
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Lastname
{
get
{
return _Lastname;
}
set
{
OnLastnameChanging(value);
ReportPropertyChanging("Lastname");
_Lastname = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Lastname");
OnLastnameChanged();
}
}
private global::System.String _Lastname;
partial void OnLastnameChanging(global::System.String value);
partial void OnLastnameChanged();
#endregion
#region Navigation Properties
/// <summary>
/// No Metadata Documentation available.
/// </summary>
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("YouGradeModel", "FK_ExamTake_User", "ExamTake")]
public EntityCollection<ExamTake> ExamTake
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<ExamTake>("YouGradeModel.FK_ExamTake_User", "ExamTake");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<ExamTake>("YouGradeModel.FK_ExamTake_User", "ExamTake", value);
}
}
}
#endregion
}
#endregion
}