コード例 #1
0
        // Modify student
        public static StudentModify.Response Handle(IRepository repository, StudentModify.Request request)
        {
            var commandModel      = request.CommandModel;
            var container         = StudentFactory.CreatePartial(commandModel.ID).Modify(commandModel);
            var validationDetails = repository.Save(container);

            return(new StudentModify.Response(validationDetails));
        }
コード例 #2
0
        // Delete studen
        public static StudentDelete.Response Handle(IRepository repository, StudentDelete.Request request)
        {
            var container = StudentFactory
                            .CreatePartial(request.CommandModel.StudentId)
                            .Delete();

            var validationDetails = repository.Save(container);

            return(new StudentDelete.Response(validationDetails));
        }