/// <summary> /// Inserts the <see cref="ITaskPoco"/> asynchronous. /// </summary> /// <param name="model">The model.</param> /// <returns>Task.</returns> public Task InsertTaskAsync(ITaskPoco model) { if (model.Id == Guid.Empty) { model.Id = Guid.NewGuid(); } model.DateUpdated = DateTime.UtcNow; model.DateCreated = DateTime.UtcNow; return(taskRepository.InsertAsync(model)); }
/// <summary> /// Adds <see cref="ITaskPoco"/> model for delete. This will not call Save() method. /// </summary> /// <param name="model">The model.</param> public virtual void AddForDelete(ITaskPoco model) { genericRepository.Delete(model); }
/// <summary> /// Updates the <see cref="ITaskPoco"/> asynchronous. /// </summary> /// <param name="model">The model.</param> /// <returns>Task.</returns> public Task UpdateTaskAsync(ITaskPoco model) { return(taskRepository.UpdateAsync(model)); }
/// <summary> /// Adds <see cref="ITaskPoco"/> model for update. This will not call Save() method. /// </summary> /// <param name="model">The model.</param> public virtual void AddForUpdate(ITaskPoco model) { genericRepository.Update(mapper.Map <DAL.Task>(model)); }
/// <summary> /// Adds <see cref="ITaskPoco"/> model for insert. This will not call Save() method. /// </summary> /// <param name="model">The model.</param> public virtual void AddForInset(ITaskPoco model) { genericRepository.Insert(mapper.Map <DAL.Task>(model)); }
/// <summary> /// Deletes the specified <see cref="ITaskPoco"/> model asynchronous. /// </summary> /// <param name="model">The model.</param> public virtual System.Threading.Tasks.Task DeleteAsync(ITaskPoco model) { genericRepository.Delete(mapper.Map <DAL.Task>(model)); return(genericRepository.SaveAsync()); }
/// <summary> /// Deletes the specified <see cref="ITaskPoco"/> model. /// </summary> /// <param name="model">The model.</param> public virtual void Delete(ITaskPoco model) { genericRepository.Delete(mapper.Map <DAL.Task>(model)); genericRepository.Save(); }
/// <summary> /// Inserts the specified <see cref="ITaskPoco"/> model into the database. /// </summary> /// <param name="model">The model.</param> public virtual void Insert(ITaskPoco model) { genericRepository.Insert(mapper.Map <DAL.Task>(model)); genericRepository.Save(); }