Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public MaskDonationModel(MaskDonation maskDonation)
 {
     maskDonation.ToMaskDonationModel();
 }