Ejemplo n.º 1
0
        public async Task <bool> UpdateAsync(FarmModifyRequest request)
        {
            var modifiedDate = DateTimeOffset.UtcNow;

            request.UpdatedDate = modifiedDate;
            var isUpdated = await _farmRepository.UpdateAsync(request);

            if (isUpdated)
            {
                await _farmPictureRepository.UpdateAsync(new FarmPicturesModifyRequest
                {
                    FarmId      = request.Id,
                    CreatedById = request.CreatedById,
                    UpdatedById = request.UpdatedById,
                    CreatedDate = modifiedDate,
                    UpdatedDate = modifiedDate,
                    Pictures    = request.Pictures
                });
            }
            return(isUpdated);
        }