Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 public HttpResponseMessage CreateSection(CreateSectionCommand command)
 {
     _serviceLocator.Resolve<CreateSection>().Execute(command);
     return new HttpResponseMessage(HttpStatusCode.Created);
 }