public object AddClient([FromBody] Client client) { if (ClientBLL.CheckIsDuplicate(Guid.Empty, client.ClientIdentity)) { return(new { Success = false, Duplicated = true }); } ClientBLL.CreateClient(client); return(new { Success = true }); }
public object UpdateClient([FromBody] Client client) { try { if (ClientBLL.CheckIsDuplicate(client.ID, client.ClientIdentity)) { return(new { Success = false, Duplicated = true }); } ClientBLL.UpdateClient(client); return(new { Success = true }); } catch (Exception ex) { LogHelper.SystemError("client - " + JsonConvert.SerializeObject(client), ex); return(ex.ToString()); } }