public int AddGuest(AddGuestCommand addGuestCommand) { using (var db = new SqlConnection(_connectionString)) { var sql = @"insert into [dbo].[Guests]([firstName], [lastName], [Address], [Relationship], [RSVP], [City], [State]) values ( @firstName, @lastName, @Address, @Relationship, @RSVP, @City, @State )"; return(db.Execute(sql, addGuestCommand)); } }
public int NewGuest(AddGuestCommand addGuestCommand) { var repo = new GuestsRepository(); return(repo.AddGuest(addGuestCommand)); }