예제 #1
0
        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));
            }
        }
예제 #2
0
        public int NewGuest(AddGuestCommand addGuestCommand)
        {
            var repo = new GuestsRepository();

            return(repo.AddGuest(addGuestCommand));
        }