Ejemplo n.º 1
0
 public bool UpdateUser(string userName, User entity)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 2
0
        public bool AddUser(string username, User entity)
        {
            try
            {
                var organization = _contex.Organizations.SingleOrDefault(c => c.Id == entity.OrganizationId);
                entity.Organization = organization;

                _contex.Users.Add(entity);
                _contex.SaveChanges();

                return true;

            }
            catch (Exception)
            {
                return false;
            }
        }