private static void CreateEmployee(string firstName, string lastName, string deptCode, string employeeId, string managerId, int salary) { var employee = new JObject(); employee.Add(FIRST_NAME, firstName); employee.Add(LAST_NAME, lastName); employee.Add(DEPT_CODE, deptCode); employee.Add(EMPLOYEE_ID, employeeId); employee.Add(MANAGER_ID, managerId); employee.Add(SALARY, salary); Store.Create(EMPLOYEES_SOUP, employee); }
private void CreateAccountsLocally(string[] names) { var attributes = new JObject { { TypeStr, Constants.Account } }; foreach (string name in names) { var account = new JObject { { Constants.Id, CreateLocalId() }, { Constants.Name, name }, { Constants.Attributes, attributes }, { SyncManager.Local, true }, { SyncManager.LocallyCreated, true }, { SyncManager.LocallyDeleted, false }, { SyncManager.LocallyUpdated, false } }; _smartStore.Create(AccountsSoup, account); } }