แก้ Defect
This commit is contained in:
parent
5ae67ee02e
commit
0096e6dd5b
8 changed files with 184 additions and 97 deletions
|
|
@ -105,7 +105,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
|||
.Where(x => x.Id == id)
|
||||
.FirstOrDefaultAsync();
|
||||
if (data == null)
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound);
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound);
|
||||
return Success(data);
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
|||
{
|
||||
var data = await _context.DisciplineDirectors.Where(x => x.Id == id).FirstOrDefaultAsync();
|
||||
if (data == null)
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound);
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound);
|
||||
|
||||
data.Prefix = req.prefix;
|
||||
data.FirstName = req.firstName;
|
||||
|
|
@ -181,7 +181,7 @@ namespace BMA.EHR.DisciplineDirector.Service.Controllers
|
|||
{
|
||||
var data = await _context.DisciplineDirectors.Where(x => x.Id == id).FirstOrDefaultAsync();
|
||||
if (data == null)
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), (int)StatusCodes.Status404NotFound);
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound);
|
||||
_context.DisciplineDirectors.Remove(data);
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue