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

            dto.Id          = entity.Id;
            dto.Active      = entity.Active;
            dto.Name        = entity.Name;
            dto.Description = entity.Description;
            dto.Value       = entity.Value;
            dto.System      = entity.System;

            return(dto);
        }
コード例 #2
0
        internal static void NotifyScheduleUserTypeUpdate(Guid?clientId, Altask.Data.Dto.ScheduleUserType scheduleUserType)
        {
            if (!clientId.HasValue)
            {
                _context.Clients.All.notifyScheduleUserTypeUpdate(new { scheduleUserType = scheduleUserType });
            }
            else
            {
                SignalRConnection connection;

                if (_connections.TryGetValue(clientId.Value, out connection))
                {
                    _context.Clients.AllExcept(connection.ConnectionId).notifyScheduleUserTypeUpdate(new { connection = connection, scheduleUserType = scheduleUserType });
                }
                else
                {
                    _context.Clients.All.notifyScheduleUserTypeCreate(new { scheduleUserType = scheduleUserType });
                }
            }
        }
コード例 #3
0
 /// <summary>
 /// Maps all the non-primary key and tracking properties of a <see cref='Altask.Data.Dto.ScheduleUserType'/> object to a <see cref='Altask.Data.Model.ScheduleUserType'/> object.
 /// </summary>
 public static Altask.Data.Model.ScheduleUserType FromDto(this Altask.Data.Model.ScheduleUserType model, Altask.Data.Dto.ScheduleUserType entity)
 {
     model.Active      = entity.Active;
     model.Name        = entity.Name;
     model.Description = entity.Description;
     model.Value       = entity.Value;
     model.System      = entity.System;
     return(model);
 }