public async Task <string> AddAffirmation(Affirmation affirmation) { var entity = DomainTranslator.TranslateToAffirmationEntity(affirmation); var result = await _AddEntity(entity, "Affirmations"); return(result); }
public async Task <string> AddTopic(Topic topic) { var entity = DomainTranslator.TranslateToTopicEntity(topic); var result = await _AddEntity(entity, "Topics"); return(result); }
public async Task <string> AddCategory(Category category) { var entity = DomainTranslator.TranslateToCategoryEntity(category); var result = await _AddEntity(entity, "Categories"); return(result); }
public async Task <bool> UpdateAffirmation(Affirmation affirmation) { var entity = DomainTranslator.TranslateToAffirmationEntity(affirmation); var result = await _UpdateEntity("Affirmations", entity); return(result); }
public async Task <Topic> GetTopicByName(string topicName) { var entity = await _GetByValue <TopicEntity>("Topics", "Name", topicName.Trim()); var result = entity != null ? DomainTranslator.TranslateToTopic(entity) : null; return(result); }
public async Task <Subscriber> GetSubscriberByUsername(string username) { var entity = await _GetByValue <SubscriberEntity>("Subscribers", "Username", username); var result = entity != null ? DomainTranslator.TranslateToSubscriber(entity) : null; return(result); }
public async Task <Subscriber> GetSubscriberById(string id) { var entity = await _GetById <SubscriberEntity>("Subscribers", id); var result = entity != null ? DomainTranslator.TranslateToSubscriber(entity) : null; return(result); }
public async Task <Category> GetCategoryByName(string categoryName) { var entity = await _GetByValue <CategoryEntity>("Categories", "Name", categoryName.Trim()); var result = entity != null ? DomainTranslator.TranslateToCategory(entity) : null; return(result); }
public async Task AddSubmission(Submission submission) { var entity = DomainTranslator.TranslateToSubmissionEntity(submission); await _AddEntity(entity, "Submissions"); }