Exemple #1
0
        /// <summary>
        /// Maps a <see cref='Altask.Data.Model.Role'/> object to a <see cref='Altask.Data.Dto.Role'/> object.
        /// </summary>
        /// <param name="includeLogs">Indicates whether to load any logs associated with the object when mapping.</param>
        public static Altask.Data.Dto.Role ToDto(this Altask.Data.Model.Role entity, bool includeLogs = false)
        {
            var dto = new Altask.Data.Dto.Role();

            dto.Id   = entity.Id;
            dto.Name = entity.Name;

            return(dto);
        }
Exemple #2
0
 /// <summary>
 /// Maps all the non-primary key and tracking properties of a <see cref='Altask.Data.Dto.Role'/> object to a <see cref='Altask.Data.Model.Role'/> object.
 /// </summary>
 public static Altask.Data.Model.Role FromDto(this Altask.Data.Model.Role model, Altask.Data.Dto.Role entity)
 {
     model.Name = entity.Name;
     return(model);
 }