Skip to content

Instantly share code, notes, and snippets.

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 mehmetalierol/3e0ef24fb1dad1078481e6dc30e4d1e2 to your computer and use it in GitHub Desktop.
Save mehmetalierol/3e0ef24fb1dad1078481e6dc30e4d1e2 to your computer and use it in GitHub Desktop.
using Company.Application.Common.Paging;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Company.Application.Common.Api.Base
{
public interface IApiController<TDto, T>
{
#region GetMethods
ApiResult<List<TDto>> GetAll();
ApiResult<TDto> Find(Guid id);
ApiResult GetAllWithPaging(PagingParams pagingParams);
#endregion
#region PostMethods
ApiResult<TDto> Add(TDto item);
Task<ApiResult<TDto>> AddAsync(TDto item);
ApiResult<TDto> Update(TDto item);
Task<ApiResult<TDto>> UpdateAsync(TDto item);
ApiResult<string> Delete(TDto item);
Task<ApiResult<string>> DeleteAsync(TDto item);
ApiResult<string> DeleteById(Guid Id);
Task<ApiResult<string>> DeleteByIdAsync(Guid id);
#endregion
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment