Beispiel #1
0
        public async Task <SocialChannelType> Get(long Id)
        {
            SocialChannelType SocialChannelType = await UOW.SocialChannelTypeRepository.Get(Id);

            if (SocialChannelType == null)
            {
                return(null);
            }
            return(SocialChannelType);
        }
Beispiel #2
0
        public async Task <SocialChannelType> Get(long Id)
        {
            SocialChannelType SocialChannelType = await DataContext.SocialChannelType.AsNoTracking()
                                                  .Where(x => x.Id == Id)
                                                  .Select(x => new SocialChannelType()
            {
                Id   = x.Id,
                Code = x.Code,
                Name = x.Name,
            }).FirstOrDefaultAsync();

            if (SocialChannelType == null)
            {
                return(null);
            }

            return(SocialChannelType);
        }