public static async Task<Guid> AddAsync(string tenant, Notification notification) { var id = await Factory.InsertAsync(tenant, notification).ConfigureAwait(false); return id.To<Guid>(); }
public static async Task SendAsync(string tenant, Notification message) { await Notifications.AddAsync(tenant, message).ConfigureAwait(false); NotificationHub.Send(tenant, message); }
public static async Task SendToUsersAsync(string tenant, int userId, int officeId, Notification message) { await Notifications.AddAsync(tenant, message).ConfigureAwait(false); NotificationHub.SendToUsers(tenant, userId, officeId, message); }
public static async Task SendToLoginAsync(string tenant, long loginId, Notification message) { await Notifications.AddAsync(tenant, message).ConfigureAwait(false); NotificationHub.SendToLogin(tenant, loginId, message); }
public static async Task SendToRolesAsync(string tenant, int roleId, Notification message) { await Notifications.AddAsync(tenant, message).ConfigureAwait(false); NotificationHub.SendToRoles(tenant, roleId, message); }