public void CreateUser(CreateUserDraft draft) { DraftPropertiesChecker.Check(draft); User user = Mapper.Map <CreateUserDraft, User>(draft); user.Password = Cryptographer.MD5Hash(user.Password); uow.Users.Add(user); uow.Save(); }
public void CreateProject(CreateProjectDraft draft) { DraftPropertiesChecker.Check(draft); uow.Projects.Add(Mapper.Map <CreateProjectDraft, Project>(draft)); uow.Save(); }