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)); }
public async Task <MyWebApp.Domain.Picture> GetAsync(IPictureIdentity picture) { var result = await this.Get(picture); return(this.Mapper.Map <MyWebApp.Domain.Picture>(result)); }
public Task <Picture> GetAsync(IPictureIdentity id) { return(this.PictureDAL.GetAsync(id)); }