public static void AddCovenantApplication(Player applicant, Covenant covenant)
        {
            ICovenantApplicationRepository covAppRepo = new EFCovenantApplicationRepository();
            var saveMe = new CovenantApplication
            {
                CovenantId = covenant.Id,
                OwnerId    = applicant.Id,
                Timestamp  = DateTime.UtcNow,
                Message    = "",
            };

            covAppRepo.SaveCovenantApplication(saveMe);
            var message = "<b><span style='color: #003300;'>" + applicant.FirstName + " " + applicant.LastName + " has applied to your covenant, " + covenant.Name + ".</span></b>";

            PlayerLogProcedures.AddPlayerLog(covenant.LeaderId, message, true);
        }
 public void SaveCovenantApplication(CovenantApplication CovenantApplication)
 {
     if (CovenantApplication.Id == 0)
     {
         context.CovenantApplications.Add(CovenantApplication);
     }
     else
     {
         var editMe = context.CovenantApplications.Find(CovenantApplication.Id);
         if (editMe != null)
         {
             // dbEntry.Name = CovenantApplication.Name;
             // dbEntry.Message = CovenantApplication.Message;
             // dbEntry.TimeStamp = CovenantApplication.TimeStamp;
         }
     }
     context.SaveChanges();
 }