コード例 #1
0
ファイル: Recette.cs プロジェクト: Flightan/Chef.Net
        /// <summary>
        /// Conversion Entity -> DBO
        /// </summary>
        public static DBO.Recette ConvertToDBO(T_Recette recette)
        {
            DBO.Recette dbo = new DBO.Recette();

            if (recette != null)
            {
                dbo.Nom = recette.nom;
                dbo.Intro = recette.introduction;
                dbo.Realisation = recette.realisation;
                dbo.TempsCuisson = Convert.ToInt16(recette.temps_cuisson);
                dbo.TempsPreparation = recette.temps_prepa;
                dbo.TempsRepos = Convert.ToInt16(recette.temps_repos);
                dbo.Difficulte = recette.difficulte;
                dbo.Photo = recette.photo;
                dbo.Categorie = recette.categorie;
                dbo.idCreateur = Convert.ToInt16(recette.createurID);
                dbo.Id = Convert.ToInt16(recette.id);
            }

            return dbo;
        }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the T_Recette EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToT_Recette(T_Recette t_Recette)
 {
     base.AddObject("T_Recette", t_Recette);
 }
コード例 #3
0
ファイル: Recette.cs プロジェクト: Flightan/Chef.Net
        /// <summary>
        /// Conversion DBO -> Entity
        /// </summary>
        public static T_Recette ConvertToEntity(DBO.Recette recette)
        {
            T_Recette entity = new T_Recette();

            if (recette != null)
            {
                entity.nom = recette.Nom;
                entity.introduction = recette.Intro;
                entity.realisation = recette.Realisation;
                entity.temps_cuisson = recette.TempsCuisson;
                entity.temps_prepa = recette.TempsPreparation;
                entity.temps_repos = recette.TempsRepos;
                entity.difficulte = recette.Difficulte;
                entity.photo = recette.Photo;
                entity.categorie = recette.Categorie;
                entity.date = DateTime.Now;
                entity.createurID = recette.idCreateur;
            }

            return entity;
        }
コード例 #4
0
 /// <summary>
 /// Create a new T_Recette object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="introduction">Initial value of the introduction property.</param>
 /// <param name="realisation">Initial value of the realisation property.</param>
 /// <param name="createurID">Initial value of the createurID property.</param>
 /// <param name="temps_prepa">Initial value of the temps_prepa property.</param>
 /// <param name="nom">Initial value of the nom property.</param>
 public static T_Recette CreateT_Recette(global::System.Int64 id, global::System.String introduction, global::System.String realisation, global::System.Int64 createurID, global::System.Int32 temps_prepa, global::System.String nom)
 {
     T_Recette t_Recette = new T_Recette();
     t_Recette.id = id;
     t_Recette.introduction = introduction;
     t_Recette.realisation = realisation;
     t_Recette.createurID = createurID;
     t_Recette.temps_prepa = temps_prepa;
     t_Recette.nom = nom;
     return t_Recette;
 }