Inheritance: System.Data.Objects.DataClasses.EntityObject
 /// <summary>
 /// Deprecated Method for adding a new object to the PhraseBeliefDatas EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPhraseBeliefDatas(PhraseBeliefData phraseBeliefData)
 {
     base.AddObject("PhraseBeliefDatas", phraseBeliefData);
 }
Exemplo n.º 2
0
    public static void LoadDataFromDto(ref PhraseBeliefData data, 
                                       PhraseBeliefDto dto, 
                                       LearnLanguagesContext context)
    {
      //USER INFO
      data.UserDataId = dto.UserId;
      data.UserData = EfHelper.GetUserData(dto.UserId, context);
      
      //PHRASE
      data.PhraseDataId = dto.PhraseId;
      data.PhraseData = EfHelper.GetPhraseData(dto.PhraseId, context);

      //SCALAR
      data.ReviewMethodId = dto.ReviewMethodId;
      data.Strength = dto.Strength;
      data.Text = dto.Text;
      data.TimeStamp = dto.TimeStamp;
    }
 /// <summary>
 /// Create a new PhraseBeliefData object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="timeStamp">Initial value of the TimeStamp property.</param>
 /// <param name="text">Initial value of the Text property.</param>
 /// <param name="strength">Initial value of the Strength property.</param>
 /// <param name="believerId">Initial value of the BelieverId property.</param>
 /// <param name="reviewMethodId">Initial value of the ReviewMethodId property.</param>
 /// <param name="phraseDataId">Initial value of the PhraseDataId property.</param>
 /// <param name="userDataId">Initial value of the UserDataId property.</param>
 public static PhraseBeliefData CreatePhraseBeliefData(global::System.Guid id, global::System.DateTime timeStamp, global::System.String text, global::System.Double strength, global::System.Guid believerId, global::System.Guid reviewMethodId, global::System.Guid phraseDataId, global::System.Guid userDataId)
 {
     PhraseBeliefData phraseBeliefData = new PhraseBeliefData();
     phraseBeliefData.Id = id;
     phraseBeliefData.TimeStamp = timeStamp;
     phraseBeliefData.Text = text;
     phraseBeliefData.Strength = strength;
     phraseBeliefData.BelieverId = believerId;
     phraseBeliefData.ReviewMethodId = reviewMethodId;
     phraseBeliefData.PhraseDataId = phraseDataId;
     phraseBeliefData.UserDataId = userDataId;
     return phraseBeliefData;
 }
Exemplo n.º 4
0
    public static PhraseBeliefDto ToDto(PhraseBeliefData data)
    {
      var dto = new PhraseBeliefDto()
      {
        Id = data.Id,
        BelieverId = data.BelieverId,
        PhraseId = data.PhraseDataId,
        ReviewMethodId = data.ReviewMethodId,
        Strength = data.Strength,
        Text = data.Text,
        TimeStamp = data.TimeStamp,
        UserId = data.UserDataId,
        Username = data.UserData.Username,
      };

      return dto;
    }