public Task <TResource> UpdateAsync <TResource>(TResource resourceToUpdate, object primaryKey) where TResource : class, IRestResource { IInMemoryRuntimeConfiguration <TResource> config = GetConfig <TResource>(); return(Task.FromResult(config.UpdateEntry(resourceToUpdate, primaryKey.ToString()))); }
public Task <IEnumerable <TResource> > SelectAllAsync <TResource>() where TResource : class, IRestResource { IInMemoryRuntimeConfiguration <TResource> config = GetConfig <TResource>(); return(Task.FromResult(config.GetAllEntries())); }
public Task <TResource> SelectByIdAsync <TResource>(object primaryKey) where TResource : class, IRestResource { IInMemoryRuntimeConfiguration <TResource> config = GetConfig <TResource>(); return(Task.FromResult(config.GetEntryByPrimaryKey(primaryKey.ToString()))); }
public Task <TResource> InsertAsync <TResource>(TResource resourceToCreate) where TResource : class, IRestResource { IInMemoryRuntimeConfiguration <TResource> config = GetConfig <TResource>(); return(Task.FromResult(config.InsertEntry(resourceToCreate))); }