Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public void CreateProject(CreateProjectDraft draft)
 {
     DraftPropertiesChecker.Check(draft);
     uow.Projects.Add(Mapper.Map <CreateProjectDraft, Project>(draft));
     uow.Save();
 }