public Community Get(int communityId)
{
try
{
var db = _communityRepository.Get(communityId);
if (db == null)
{
return new Community().GenerateError<Community>((int)Constants.Error.RecordNotFound,
string.Format("Cannot find community with Id {0}", communityId));
}
var result = CommunityMapper.ToDto(db);
result.MemberCount = GetCommunityMemberCount(result.Id);
return result;
}
catch (Exception ex)
{
throw new BlogException(ex.Message, ex.InnerException);
}
}