public JsonResult Save([Bind(Include = "Id,Address1,Address2,CountryId,City,State,PostalCode,IsActive")] AddressModel address, bool isInsert) { if (isInsert) { address.SetCreateProperties(LoginInformation.UserInformation.Id); address.Id = _addressService.Insert(address); } else { address.SetUpdateProperties(LoginInformation.UserInformation.Id); _addressService.Update(address); } return(new JsonResult { Data = _addressService.GetById(address.Id) }); }