public static RSVP EditRSVP(RSVP rsvp)
        {
            using (var con = Open())
            {
                rsvp.EditDate = DateTime.Now;
                rsvp.ConfimationNumber = new Guid();
                CommandDefinition command = new CommandDefinition(StoredProcedures.Proc_Custom_RSVPRepositories_EditRSVP.ToString(),
                    new
                    {
                        rsvp.RSVPId,
                        rsvp.CreateDate,
                        rsvp.ConfimationNumber,
                        rsvp.isAttending,
                        rsvp.AttendingGuests,
                        rsvp.FavoriteWine,
                        rsvp.FirstName,
                        rsvp.LastName,
                        rsvp.ShortDescription,
                    }, commandType: CommandType.StoredProcedure);
                rsvp = con.Query<RSVP>(command).FirstOrDefault();
            }

            if (rsvp == null)
            {
                rsvp = new RSVP();
            }

            return rsvp;
        }
 public static void DeleteRSVP(int id)
 {
     RSVP rsvp = new RSVP();
     using (var con = Open())
     {
         CommandDefinition command = new CommandDefinition(StoredProcedures.Proc_Custom_RSVPRepositories_DeleteRSVP.ToString(),
             new
             {
                 id = id
             }, commandType: CommandType.StoredProcedure);
         rsvp = con.Query<RSVP>(command).FirstOrDefault();
     }
 }
 public static RSVP GetRSVPByConfirmationNumber(string number)
 {
     RSVP rsvp = new RSVP();
     using (var con = Open())
     {
         CommandDefinition command = new CommandDefinition(StoredProcedures.Proc_Custom_RSVPRepositories_GetRSVPByConfimationNumber.ToString(),
             new
             {
                 ConfimationNumber = number
             }, commandType: CommandType.StoredProcedure);
         rsvp = con.Query<RSVP>(command).FirstOrDefault();
     }
     return rsvp;
 }