示例#1
0
        public int Add(IPeople user)
        {
            if (user == null)
            {
                throw new ArgumentNullException("User");
            }
            if (user.UserRoles == null)
            {
                throw new ArgumentNullException("User roles");
            }
            int userId = 0;

            using (TransactionScope scope = new TransactionScope())
            {
                userId = _peopleDomain.Add(MapPeopleDTOtoDomain(user));
                scope.Complete();
            }
            return(userId);
        }