DataClient Documentation
Client Conventions
==Each client should be scoped to a single logical data grouping.== For example, tasks and custom fields are stored in separate tables but are closely related. Therefore, they belong to the same client. ==Succinct naming should be used for each client.== Use as few words as possible. If other words can be implied from the name, such as LocationClient instead of FedsLocationClient.
Client Method Conventions
==Client methods can do anything that you need.== When you need to perform a repeatable action with the database, you must create a client method. All database interaction must occur via these methods – this ensures consistency and correct implementations. ==Naming should be short.== Don’t use implied words like ById or All when they can be implied. ==Use the following keywords:==
Create– When a record is inserted to the databse. Whether it is a single record or multiple records across multiple tables.Read– When reading some data from the database without creating or updating anything.Update– When one or more existing record is updated.Delete– When a delete operation is performed. This applies to hard delete and soft delete.
Create Methods
Must return the newly created record. If multiple records must be returned, they should be bundled appropriately.
Should accept a create request object as a parameter.
Read Methods
Default Read methods should exist:
ReadObject(long id)ReadObjectsByOther(long id)ReadObjectsByAnother(long id)ReadObjects(IEnumerable<long> id)ReadObjects()
Update
Should
Last updated
Was this helpful?