Q:

looking for a good example to create a db record with dapper/sproc

Can you point me to a good example for creating a db record with Dapper via sproc? Ideally I would take an OO approach similar to EF like this:
var user = new User{ FirstName="John", LastName="Smith"}
var userId = dapper.Create(User);
return userId;

Of course, I'm open to the "right" way of doing this in dapper if dapper recommends a different approach

A:

Assuming you have a stored procedure to add a record to the User table like
CREATE PROCEDURE SaveUser(@firstName VARCHAR(10),@lastName VARCHAR(10))
AS
    BEGIN
       INSERT INTO [User] (FirstName,LastName) VALUES (@firstName ,@lastName);
       SELECT SCOPE_IDENTITY()
    END

Assuming your User table has Id column (PK) set to Identity.
Now, you can execute your stored procedure like this
var conStr="Replace your connection string here";
using (var con = new SqlConnection(conStr))
{
   var userId = con.Query<int>("SaveUser", 
                                    new {@firstName = "John", @lastName = "Smith"},
                                    commandType: CommandType.StoredProcedure
                              ).First();          
}

If you have a class to represent the User table record, you can pass that class object when you call the stored proc.
public class UserDto
{
  public string FirstName { set;get;}
  public string LastName { set;get;}
}

and simply pass the object of this!
var conStr="Replace your connection string here";
var u = new UserDto { FirstName = "Johny", LastName= "Depp" };
using (var con = new SqlConnection(conStr))
{
   var userId = con.Query<int>("SaveUser", u, commandType: CommandType.StoredProcedure)
                   .First();          
}

