public int Execute(CreateApplicationCommand command) { var applicationId = _databaseGateway.Database.Insert("Application") .Column("Identifier", command.Identifier) .Column("Name", command.Name) .Column("SecretKey", command.SecretKey) .Column("Description", command.Description) .Column("Created", DateTime.Now) .Column("Modified", DateTime.Now) .Command.ExecuteReturnLastId<int>(); return applicationId; }
public HttpResponseMessage CreateApplication(CreateApplicationCommand command) { _serviceLocator.Resolve<CreateApplication>().Execute(command); return new HttpResponseMessage(HttpStatusCode.Created); }