public async Task <int> AddAreaMovements(string[] stringMovementIdList, int areaId) { AreaMovements newAreaMovement = null; int success = 0; foreach (var thatMovement in stringMovementIdList) { newAreaMovement = new AreaMovements(); newAreaMovement.FKMovementId = Convert.ToInt32(thatMovement); newAreaMovement.FKAreaId = areaId; await _areaMovementsRepository.Add(newAreaMovement); success = await _areaMovementsRepository.Save(); } if (success > 0) { return(1); } return(0); }
public async Task <AreaMovements> AreaMovementsById(int Id) { AreaMovements getAreaMovements = await _areaMovementsRepo.Get(p => p.Id == Id); return(getAreaMovements); }
public async Task <int> DeleteAreaMovementsAsync(AreaMovements areaMovements) { return(await _areaMovementsRepo.Delete(areaMovements)); }
public async Task <int> EditAreaMovementsAsync(AreaMovements areaMovements) { return(await _areaMovementsRepo.Edit(areaMovements)); }
public async Task <int> AddAreaMovementsAsync(AreaMovements areaMovements) { return(await _areaMovementsRepo.Add(areaMovements)); }