Added functionality to stop recreating tas of same name
This commit is contained in:
parent
b3ceecaf9e
commit
60acd104c1
@ -1915,19 +1915,7 @@ namespace Marco.Pms.Services.Helpers
|
||||
UpdateAt = DateTime.UtcNow
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateException dbEx)
|
||||
{
|
||||
|
||||
return ApiResponse<object>.ErrorResponse("User Send empty Payload", new
|
||||
{
|
||||
message = dbEx.Message,
|
||||
innerexcption = dbEx.InnerException.Message
|
||||
}, 400);
|
||||
}
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
contact = await _context.Contacts.Include(c => c.ContactCategory).FirstOrDefaultAsync(c => c.Id == id && c.IsActive && c.TenantId == tenantId) ?? new Contact();
|
||||
phones = await _context.ContactsPhones.AsNoTracking().Where(p => p.ContactId == contact.Id).ToListAsync();
|
||||
|
Loading…
x
Reference in New Issue
Block a user