Example #1
0
        private async Task <Picture> Get(IPictureIdentity picture)
        {
            if (picture == null)
            {
                throw new ArgumentNullException(nameof(picture));
            }

            return(await this.Context.Picture.FirstOrDefaultAsync(x => x.Id == picture.Id));
        }
Example #2
0
        public async Task <MyWebApp.Domain.Picture> GetAsync(IPictureIdentity picture)
        {
            var result = await this.Get(picture);

            return(this.Mapper.Map <MyWebApp.Domain.Picture>(result));
        }
Example #3
0
 public Task <Picture> GetAsync(IPictureIdentity id)
 {
     return(this.PictureDAL.GetAsync(id));
 }