public async Task <int> CreateNewGroup(string groupTitle, string ownerId) { try { var result = await _group.AddGroup(groupTitle, ownerId); if (result.Id > 0) { return(result.Id); } else { return(0); } } catch (Exception error) { Console.WriteLine(error); return(0); } }
public ActionResult <Group> Add(GroupModel group) { return(Ok(groupRepository.AddGroup(group))); }
public void AddGroup(Group group) { _group.AddGroup(group); }