public CommandResult Execute() { //using (var transaction = new TransactionScope()) //{ // var contentService = new ContentService(transaction.Context); // contentService.AddContents(ContentArgs, UserId, UserLoginId); // transaction.CompleteTransaction(); // return Utility.CommandSuccess(); //} var contentService = new ContentService(); contentService.AddContents(ContentArgs, UserId, UserLoginId); return(Utility.CommandSuccess()); }
public CommandResult Execute() { User user; using (var transaction = new TransactionScope()) { user = new UserService(transaction.Context).CreateAgent(PersonalInformationArg); transaction.CompleteTransaction(); } var contentService = new ContentService(); contentService.AddContents(new List <ContentArg> { LogoImage }, user.PersonId, UserLoginId); return(Utility.CommandSuccess()); }
public CommandResult Execute() { using (var transaction = new TransactionScope()) { var userService = new UserService(transaction.Context); var categoryService = new CategoryService(transaction.Context); var contactService = new ContactService(transaction.Context); var contentServie = new ContentService(transaction.Context); var user = userService.RegisterModel(PersonalInformationArg, PhysicalInformationArg); userService.AddSkills(SkillArgs, user.PersonId, user.UserLoginId); categoryService.CreateCategories(CategoryTypeIds, user.PersonId, user.UserLoginId); contactService.CreateContactInfos(ContactInfoArgs, user.PersonId, user.UserLoginId); contentServie.AddContents(ContentArgs, user.PersonId, user.UserLoginId); transaction.CompleteTransaction(); return(Utility.CommandSuccess(user.PersonId)); } }