public static int Update(this IContactService service, int contactId, Action<IFieldSetter<Contact>> setter) { var fieldSetter = new TableFieldSetter<Contact>(Access.Edit); setter(fieldSetter); return service.Update(contactId, fieldSetter.XmlStruct); }
public static int Add(this IContactService service, Action<IFieldSetter<Contact>> fieldSetter) { var setter = new TableFieldSetter<Contact>(Access.Add); fieldSetter(setter); return service.Add(setter.XmlStruct); }
public static int AddWithDupCheck(this IContactService service, Action<IFieldSetter<Contact>> fieldSetter, DupCheckType checkType) { var setter = new TableFieldSetter<Contact>(Access.Add); fieldSetter(setter); return service.AddWithDupCheck(setter.XmlStruct, checkType.ToString()); }