예제 #1
0
        public async Task <OperationResult <community> > GetByIdAsync(int id)
        {
            community community = await communityRepo.GetByIdAsync(id);

            if (community != null)
            {
                return(new OperationResult <community>()
                {
                    Success = true, Message = Messages.COMMUNITY_SUCCESS, Result = community
                });
            }
            return(new OperationResult <community>()
            {
                Success = false, Message = Messages.COMMUNITY_NOT_EXIST
            });
        }
예제 #2
0
        public void GetCommunity()
        {
            community res = com.GetByIdAsync(1).Result;

            Assert.AreEqual("cenas", res.name);
        }