public Guid CreateGroup(string name, string description, string interests)
        {
            Group newGroup = new Group();
            newGroup.Name = name;
            newGroup.Description = description;
            newGroup.Interests = interests;

            Repository.Add(newGroup);

            return newGroup.ID;
        }
        /// <summary>
        /// Adds a new group.
        /// </summary>
        /// <param name="group">Group object.</param>
        /// <returns>New group unique identifier.</returns>
        public Guid Add(Group group)
        {
            Guid guid = Guid.Empty;

            using (ISession session = NHibernateHelper.OpenSession())
            {
                using (ITransaction transaction = session.BeginTransaction())
                {
                    group.CreatedOn = DateTime.Now;
                    group.UpdatedOn = DateTime.Now;
                    guid = (Guid)session.Save(group);
                    transaction.Commit();
                }
            }

            return guid;
        }
 public void ModifyGroup(Group group)
 {
     Repository.Update(group);
 }
        public Guid AddGroup(Group group)
        {
            Repository.Add(group);

            return group.ID;
        }
 /// <summary>
 /// Updates an existing group.
 /// </summary>
 /// <param name="group">Group object.</param>
 public void Update(Group group)
 {
     using (ISession session = NHibernateHelper.OpenSession())
     {
         using (ITransaction transaction = session.BeginTransaction())
         {
             group.UpdatedOn = DateTime.Now;
             session.Update(group);
             transaction.Commit();
         }
     }
 }
 /// <summary>
 /// Removes an existing group from the database.
 /// </summary>
 /// <param name="group">Group to remove.</param>
 public void Remove(Group group)
 {
     using (ISession session = NHibernateHelper.OpenSession())
     {
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.Delete(group);
             transaction.Commit();
         }
     }
 }