Skip to content

EF Core Services Class Structure

Chris Straw edited this page Sep 9, 2022 · 5 revisions

Plus Sign (+) -> Indicates a public method or property

For each async method, there is a non-async method

classDiagram
    IDisposable <|-- OltDisposable
    IDisposable <|-- IOltInjectableScoped
    IOltInjectableScoped <|-- IOltCoreService
    IOltCoreService <|-- OltCoreService    
    OltDisposable <|-- OltCoreService: Base Dispoable class
    OltCoreService <|-- OltContextService    
    OltContextService <|-- OltEntityService
    OltEntityService <|-- OltEntityIdService
    OltEntityIdService <|-- YourEntityIdRepoService
    class OltDisposable {
        Disposed
        Dispose(disposing)
        +Dispose()        
    }
    class OltCoreService {
        ServiceManager
    }
    class OltContextService{      
      Context
      SaveChangesAsync()
      InitializeQueryable()
      GetQueryable(IOltSearcher)
      GetAllAsync(IOltSearcher)
      GetAsync(IOltSearcher)
      MarkDeletedAsync(Entity)
      CountAsync(IQueryable)      
    }
    class OltEntityService{
      Repository
      +GetAsync(IOltSearcher)
      +GetAllAsync(IOltSearcher)
      +GetPagedAsync(pagingParams)
      +AddAsync(IOltSearcher, dataModel)
      +UpdateAsync(IOltSearcher, dataModel)
      +SoftDeleteAsync(IOltSeacher)
    }
    class OltEntityIdService{
      +GetAsync(id)
      +AddAsync(dataModel)
      +UpdateAsync(id, dataModel)
      +SoftDeleteAsync(id)
    }            
    class YourEntityIdRepoService{
    }            


Loading

Created with https://mermaid.live/

Clone this wiki locally