Issue: Insert method always returned null for the primary key.

Found that the statement "select @@IDENTITY id" was always returning null when executed through Dapper. Modified the insert statement to append SQL to retrieve the generated identity value. Changed the method used to execute the insert to .Query so that it inserts the data and returns the identity value in a single trip to the database.