POST hogy tudjunk menteni is.
This commit is contained in:
@@ -66,6 +66,30 @@ namespace WorkFlowCheck.BL.Services
|
||||
|
||||
return retVal;
|
||||
}
|
||||
public async Task<CheckPointDTO> UpdateCheckPointAsync(CheckPointDTO checkPointDTO)
|
||||
{
|
||||
var retVal = new CheckPointDTO();
|
||||
|
||||
try
|
||||
{
|
||||
var res = await _dbContext.CheckPoints.Where(w => w.Id == checkPointDTO.Id).FirstOrDefaultAsync();
|
||||
if (res != null)
|
||||
{
|
||||
res.ShortName = checkPointDTO.ShortName;
|
||||
res.Code = checkPointDTO.Code;
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
retVal = _mapper.Map<CheckPointDTO>(res);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
public async Task<List<LocationDTO>> GetAllLocationAsync()
|
||||
{
|
||||
var retVal = new List<LocationDTO>();
|
||||
|
||||
Reference in New Issue
Block a user