/// <summary> /// Maps a <see cref='Altask.Data.Model.TaskAlertUser'/> object to a <see cref='Altask.Data.Dto.TaskAlertUser'/> object. /// </summary> /// <param name="includeLogs">Indicates whether to load any logs associated with the object when mapping.</param> public static Altask.Data.Dto.TaskAlertUser ToDto(this Altask.Data.Model.TaskAlertUser entity, bool includeLogs = false) { var dto = new Altask.Data.Dto.TaskAlertUser(); dto.Id = entity.Id; dto.TaskAlertId = entity.TaskAlertId; dto.UserId = entity.UserId; dto.CreatedBy = entity.CreatedBy; dto.CreatedOn = entity.CreatedOn; dto.UpdatedBy = entity.UpdatedBy; dto.UpdatedOn = entity.UpdatedOn; if (entity.User != null) { dto.User = entity.User.ToDto(); } return(dto); }
internal static void NotifyTaskAlertUserUpdate(Guid?clientId, Altask.Data.Dto.TaskAlertUser taskAlertUser) { if (!clientId.HasValue) { _context.Clients.All.notifyTaskAlertUserUpdate(new { taskAlertUser = taskAlertUser }); } else { SignalRConnection connection; if (_connections.TryGetValue(clientId.Value, out connection)) { _context.Clients.AllExcept(connection.ConnectionId).notifyTaskAlertUserUpdate(new { connection = connection, taskAlertUser = taskAlertUser }); } else { _context.Clients.All.notifyTaskAlertUserCreate(new { taskAlertUser = taskAlertUser }); } } }
/// <summary> /// Maps all the non-primary key and tracking properties of a <see cref='Altask.Data.Dto.TaskAlertUser'/> object to a <see cref='Altask.Data.Model.TaskAlertUser'/> object. /// </summary> public static Altask.Data.Model.TaskAlertUser FromDto(this Altask.Data.Model.TaskAlertUser model, Altask.Data.Dto.TaskAlertUser entity) { model.TaskAlertId = entity.TaskAlertId; model.UserId = entity.UserId; return(model); }