public async void UpdateUserInTraining(DAL.App.DTO.UserInTraining userInTraining) { var usr = await RepoDbSet.FindAsync(userInTraining.Id); usr.AttendingTraining = userInTraining.AttendingTraining; RepoDbSet.Update(usr); }
public async Task <DTO.WorkoutRoutine> ChangeRoutinePublishStatus(Guid routineId, bool isPublished) { var routineToPublish = await RepoDbSet.FindAsync(routineId); routineToPublish.CreatedAt = isPublished ? DateTime.Now : DateTime.MaxValue; RepoDbSet.Update(routineToPublish); return(Mapper.MapDomainToDAL(routineToPublish)); }
public async Task <DAL.App.DTO.Notification> UpdateNotification(DAL.App.DTO.Notification notification) { var domain = await RepoDbSet.FindAsync(notification.Id); domain.Recived = true; var addedNotification = RepoDbSet.Update(domain).Entity; return(NotificationMapper.Map(addedNotification)); }
public override async Task <Category> UpdateAsync(Category entity, object?userId = null) { var domainEntity = DALMapper.Map(entity); // fix the language string - from mapper we get new ones - so duplicate values will be created in db // load back from db the originals domainEntity.Name = await RepoDbContext.LangStrings.Include(t => t.Translations).FirstAsync(s => s.Id == domainEntity.NameId); domainEntity.Name.SetTranslation(entity.Name); await CheckDomainEntityOwnership(domainEntity, userId); var trackedDomainEntity = RepoDbSet.Update(domainEntity).Entity; var result = DALMapper.Map(trackedDomainEntity); return(result); }
public void UpdateNoReturnAsync(TestTypeMinimal dalTestTypeMinimal) { RepoDbSet.Update(_mapper.MapToDomain(dalTestTypeMinimal)); }
public void UpdateNoReturnAsync(ComponentMinimal dalComponentFull) { RepoDbSet.Update(_mapper.MapToDomain(dalComponentFull)); }
public void UpdateNoReturnAsync(UnitOfMeasureMinimal dalUnitOfMeasureMinimal) { RepoDbSet.Update(_mapper.MapToDomain(dalUnitOfMeasureMinimal)); }
public void UpdateNoReturnAsync(ComponentTypeSpecificationMinimal dalComponentTypeSpecificationMinimal) { RepoDbSet.Update(_mapper.MapToDomain(dalComponentTypeSpecificationMinimal)); }
public void UpdateBaseRoutine(DTO.WorkoutRoutine routine) { RepoDbSet.Update(Mapper.MapDALToDomain(routine)); }
public void UpdateNoReturnAsync(CompatibilityMinimal dalCompatibilityMinimal) { RepoDbSet.Update(_mapper.MapToDomain(dalCompatibilityMinimal)); }
public void UpdateNoReturnAsync(ManufacturerMinimal dalManufacturerMinimal) { RepoDbSet.Update(_mapper.MapToDomain(dalManufacturerMinimal)); }