예제 #1
0
        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);
        }
예제 #2
0
        public async Task <AreaMovements> AreaMovementsById(int Id)
        {
            AreaMovements getAreaMovements = await _areaMovementsRepo.Get(p => p.Id == Id);

            return(getAreaMovements);
        }
예제 #3
0
 public async Task <int> DeleteAreaMovementsAsync(AreaMovements areaMovements)
 {
     return(await _areaMovementsRepo.Delete(areaMovements));
 }
예제 #4
0
 public async Task <int> EditAreaMovementsAsync(AreaMovements areaMovements)
 {
     return(await _areaMovementsRepo.Edit(areaMovements));
 }
예제 #5
0
 public async Task <int> AddAreaMovementsAsync(AreaMovements areaMovements)
 {
     return(await _areaMovementsRepo.Add(areaMovements));
 }