Created
October 7, 2014 16:50
-
-
Save Injac/a34f433ba0eb7043b064 to your computer and use it in GitHub Desktop.
Sample IDataService
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading.Tasks; | |
/// <summary> | |
/// Interface that specifies | |
/// the CRUD operations to | |
/// replicate the online data | |
/// locally. | |
/// </summary> | |
public interface IReplicaService<U> where U:class { | |
/// <summary> | |
/// Gets or sets the database context. | |
/// </summary> | |
/// <value> | |
/// The database context. | |
/// </value> | |
U DatabaseContext { | |
get; | |
set; | |
} | |
/// <summary> | |
/// Initializes the replica database. | |
/// </summary> | |
/// <param name="dbPath">The database path.</param> | |
/// <returns></returns> | |
Task InitReplicaDb(string dbPath); | |
/// <summary> | |
/// Adds the replica entry. | |
/// </summary> | |
/// <param name="query">The query.</param> | |
/// <returns></returns> | |
Task AddReplicaEntry<T>(T entity); | |
/// <summary> | |
/// Deletes the replica entry. | |
/// </summary> | |
/// <param name="query">The query.</param> | |
/// <returns></returns> | |
Task DeleteReplicaEntry<T>(T entity); | |
/// <summary> | |
/// Updates the replica entry. | |
/// </summary> | |
/// <param name="query">The query.</param> | |
/// <returns></returns> | |
Task UpdateReplicaEntry<T>(T entity); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment