Exemple #1
0
        public bool Delete(mo.User User)
        {
            var result = false;

            try
            {
                if (User == null)
                {
                    throw new ArgumentNullException("User");
                }

                _userRepo.Delete(User);

                result = true;
            }
            catch
            {
                throw;
            }

            return(result);
        }
Exemple #2
0
        public bool Add(mo.User User)
        {
            var result = false;

            try
            {
                if (User == null)
                {
                    throw new ArgumentNullException("User");
                }

                User.CreationTime = DateTime.UtcNow;

                _userRepo.Insert(User);

                result = true;
            }
            catch
            {
                throw;
            }

            return(result);
        }