Skip to content

Instantly share code, notes, and snippets.

@cerkit
Created March 25, 2014 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cerkit/9768985 to your computer and use it in GitHub Desktop.
Save cerkit/9768985 to your computer and use it in GitHub Desktop.
The core interface for defining an service for retrieving Entities from a WebAPI
using RecordKeeper.Portable.Models;
using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
namespace PortableClient.WebApi.Dal.Interfaces
{
public interface IEntityService<TEntity> where TEntity : EntityBase
{
Task<IEnumerable<TEntity>> Get(ICredentials credentials = null);
Task<TEntity> Get(string id, ICredentials credentials = null);
void Update(TEntity entity, ICredentials credentials = null);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment