public int Execute(CreateSectionCommand command) { var sectionId = _databaseGateway.Database.Insert("Section") .Column("Name", command.Name) .Column("ApplicationId", command.ApplicationId) .Column("Created", DateTime.Now) .Column("Modified", DateTime.Now) .Command.ExecuteReturnLastId<int>(); return sectionId; }
public HttpResponseMessage CreateSection(CreateSectionCommand command) { _serviceLocator.Resolve<CreateSection>().Execute(command); return new HttpResponseMessage(HttpStatusCode.Created); }