public static async Task <MaskDonationModel> UpdateMaskDonationStatus(DataContext dataContext, string status, Guid id) { var statusEnum = EnumUtils.GetValue <DonationStatus>(status); var maskDonation = await MaskDonation.UpdateStatus(dataContext, id, statusEnum); await dataContext.SaveChangesAsync(); return(maskDonation); }
public static async Task <MaskDonationModel> CreateMaskDonation(DataContext dataContext, EmailSettings emailSettings, MaskDonationModel maskDonationModel) { var maskDonation = await MaskDonation.Create(dataContext, maskDonationModel); await SendDonationOnItsWayEmail(emailSettings, maskDonation); await EmailUtils.SendEmailAsync(emailSettings, EmailMessageType.MaskDonationSubmitted, "Your donation was submitted successfully", "Donation offer received", maskDonationModel.Donor.Email); return(maskDonation); }
public MaskDonationModel(MaskDonation maskDonation) { maskDonation.ToMaskDonationModel(); }