แก้บั้กบันทึกคำสั่งไม่ได้
เพิ่มการใส่ค่าผู้ทำรายการใน GenericRepoository
This commit is contained in:
parent
71c8ff95e4
commit
e8607f76fa
4 changed files with 29 additions and 12 deletions
|
|
@ -42,6 +42,15 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.FirstOrDefaultAsync(x => x.Id == id);
|
||||
}
|
||||
|
||||
public override async Task<Command> AddAsync(Command command)
|
||||
{
|
||||
var status = await _dbContext.Set<CommandStatus>().FirstOrDefaultAsync(c => c.Sequence == 1);
|
||||
command.CommandStatus = status!;
|
||||
_dbContext.Attatch(status!);
|
||||
|
||||
return await base.AddAsync(command);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public async Task<List<CommandReceiver>> GetReceiverByCommmandIdAsync(Guid Id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue