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