コード例 #1
0
ファイル: Commentaire.cs プロジェクト: Flightan/Chef.Net
        /// <summary>
        /// Conversion DBO -> Entity
        /// </summary>
        public static T_Commentaire ConvertToEntity(DBO.Commentaire commentaire)
        {
            T_Commentaire entity = new T_Commentaire();

            if (commentaire != null)
            {
                entity.texte = commentaire.Text;
                entity.utilisateurID = commentaire.idUser;
                entity.recetteID = commentaire.idRecette;
            }

            return entity;
        }
コード例 #2
0
ファイル: Commentaire.cs プロジェクト: Flightan/Chef.Net
        /// <summary>
        /// Conversion Entity -> DBO
        /// </summary>
        public static DBO.Commentaire ConvertToDBO(T_Commentaire commentaire)
        {
            DBO.Commentaire dbo = new DBO.Commentaire();

            if (commentaire != null)
            {
                dbo.Id = Convert.ToInt16(commentaire.id);
                dbo.Text = commentaire.texte;
                dbo.idRecette = Convert.ToInt16(commentaire.recetteID);
                dbo.idUser = Convert.ToInt16(commentaire.utilisateurID);
            }

            return dbo;
        }
コード例 #3
0
 /// <summary>
 /// Create a new T_Commentaire object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="utilisateurID">Initial value of the utilisateurID property.</param>
 /// <param name="recetteID">Initial value of the recetteID property.</param>
 public static T_Commentaire CreateT_Commentaire(global::System.Int64 id, global::System.Int64 utilisateurID, global::System.Int64 recetteID)
 {
     T_Commentaire t_Commentaire = new T_Commentaire();
     t_Commentaire.id = id;
     t_Commentaire.utilisateurID = utilisateurID;
     t_Commentaire.recetteID = recetteID;
     return t_Commentaire;
 }
コード例 #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the T_Commentaire EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToT_Commentaire(T_Commentaire t_Commentaire)
 {
     base.AddObject("T_Commentaire", t_Commentaire);
 }