Resloved conflicts
This commit is contained in:
parent
4282966afd
commit
3a37cfdf37
@ -87,8 +87,6 @@ namespace Marco.Pms.Services.Helpers
|
||||
contacts = await _context.Contacts.Include(c => c.ContactCategory).Where(c => contactIds.Contains(c.Id) && c.TenantId == tenantId && c.IsActive == active).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
var phoneNo = await _context.ContactsPhones.Where(p => contactIds.Contains(p.ContactId)).ToListAsync();
|
||||
var Emails = await _context.ContactsEmails.Where(E => contactIds.Contains(E.ContactId)).ToListAsync();
|
||||
var Tags = await _context.ContactTagMappings.Where(t => contactIds.Contains(t.ContactId)).ToListAsync();
|
||||
@ -181,7 +179,6 @@ namespace Marco.Pms.Services.Helpers
|
||||
return ApiResponse<object>.SuccessResponse(list, System.String.Format("{0} contacts fetched successfully", list.Count), 200);
|
||||
|
||||
}
|
||||
|
||||
public async Task<ApiResponse<object>> GetContactsListByBucketId(Guid id)
|
||||
{
|
||||
Guid tenantId = _userHelper.GetTenantId();
|
||||
@ -461,7 +458,6 @@ namespace Marco.Pms.Services.Helpers
|
||||
_logger.LogWarning("Employee with ID {LoggedInEmployeeId} sended empty payload", LoggedInEmployee.Id);
|
||||
return ApiResponse<object>.ErrorResponse("User Send empty Payload", "User Send empty Payload", 400);
|
||||
}
|
||||
|
||||
public async Task<ApiResponse<object>> UpdateContact(Guid id, UpdateContactDto updateContact)
|
||||
{
|
||||
Guid tenantId = _userHelper.GetTenantId();
|
||||
@ -695,19 +691,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);
|
||||
}
|
||||
|
||||
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