private YachtTourFileStreams GenerateForUpdate(YachtTourFileStreams entity) { var now = DateTime.Now.Date; var userId = UserContextHelper.UserId; entity.LastModifiedBy = userId; entity.LastModifiedDate = now; return(entity); }
private YachtTourFileStreams GenerateEntityForCreate(YachtTourFileStreamCreateModel model, int tourId) { var userId = UserContextHelper.UserId; var entity = new YachtTourFileStreams(); entity = _mapper.Map <YachtTourFileStreamCreateModel, YachtTourFileStreams>(model, entity); entity.YachtTourFid = tourId; entity.LastModifiedBy = userId; entity.LastModifiedDate = DateTime.Now.Date; return(entity); }