예제 #1
0
        public async Task <ObjectResult> UpdateDepozitAsync([FromBody] GeneralDepozitRequest request, [FromRoute] int id)
        {
            Depozit result = _depozitServices.DepozitRepository.Update(request.ToDTO(id));
            await _depozitServices.CommitChanges();

            return(Ok(result));
        }
예제 #2
0
        public async Task <ObjectResult> CreateDepozitAsync([FromBody] GeneralDepozitRequest request)
        {
            Depozit result = await _depozitServices.DepozitRepository.CreateAsync(request.ToDTO());

            await _depozitServices.CommitChanges();

            return(Ok(result));
        }