public async Task<Customer> InsertCustomer(Customer customer)
{
var cmd = Sequelocity.GetDatabaseCommand();
cmd.GenerateInsertForSqlServer(customer, "dbo.Customer");
var newId = await cmd.ExecuteScalarAsync<long>();
return await GetCustomerById(newId);
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
pr = "!f() { exec az.cmd repos pr create \"$@\" --open; }; f" | |
repo = "!f() { exec az.cmd repos \"$@\"; }; f" | |
build = "!f() { exec az.cmd pipelines run --name \"$@\" --branch \"$(git rev-parse --abbrev-ref HEAD)\" --open; }; f" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
GVERSION="1.10" | |
GFILE="go$GVERSION.linux-amd64.tar.gz" | |
GOPATH="$HOME/projects/go" | |
GOROOT="/usr/local/go" | |
if [ -d $GOROOT ]; then | |
echo "Installation directories already exist $GOROOT" |
public async Task<Customer> GetCustomerById(long id)
{
var cmd = Sequelocity.GetDatabaseCommand();
cmd.SetCommandText(@"select top 1 * from dbo.Customer where CustomerId = @CustomerId");
cmd.AddParameter("@CustomerId", id, DbType.Int64);
return await cmd.ExecuteToObjectAsync<Customer>();
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class String | |
SPACE = ' ' | |
APOS = "'" | |
def nameize | |
case self | |
when / / | |
downcase.split(SPACE).each { |part| part.nameize! }.join(SPACE) | |
when /^(mac|mc)(\w)(.*)$/i | |
"#{$1.capitalize}#{$2.capitalize}#{$3}" |
##API URLS
- Account Resources
- Catalog Resources
- Downline Resources