Table of Contents

Class FormService

Namespace
JJMasterData.Core.DataManager.Services
Assembly
JJMasterData.Core.dll
public class FormService
Inheritance
FormService
Inherited Members

Constructors

FormService(IEntityRepository, FormFileService, FieldValidationService, AuditLogService, IStringLocalizer<MasterDataResources>, ILogger<FormService>)

public FormService(IEntityRepository entityRepository, FormFileService formFileService, FieldValidationService fieldValidationService, AuditLogService auditLogService, IStringLocalizer<MasterDataResources> localizer, ILogger<FormService> logger)

Parameters

entityRepository IEntityRepository
formFileService FormFileService
fieldValidationService FieldValidationService
auditLogService AuditLogService
localizer IStringLocalizer<MasterDataResources>
logger ILogger<FormService>

Methods

DeleteAsync(FormElement, Dictionary<string, object>, DataContext)

Delete records in the database using the primaryKeys filter.

public Task<FormLetter> DeleteAsync(FormElement formElement, Dictionary<string, object> primaryKeys, DataContext dataContext)

Parameters

formElement FormElement
primaryKeys Dictionary<string, object>

Primary keys to delete records on the database.

dataContext DataContext

Returns

Task<FormLetter>

InsertAsync(FormElement, Dictionary<string, object>, DataContext, bool)

public Task<FormLetter> InsertAsync(FormElement formElement, Dictionary<string, object> values, DataContext dataContext, bool validateFields = true)

Parameters

formElement FormElement
values Dictionary<string, object>
dataContext DataContext
validateFields bool

Returns

Task<FormLetter>

InsertOrReplaceAsync(FormElement, Dictionary<string, object>, DataContext)

Insert or update if exists, applying expressions and default values.

public Task<FormLetter<CommandOperation>> InsertOrReplaceAsync(FormElement formElement, Dictionary<string, object> values, DataContext dataContext)

Parameters

formElement FormElement
values Dictionary<string, object>

Values to be inserted.

dataContext DataContext

Returns

Task<FormLetter<CommandOperation>>

UpdateAsync(FormElement, Dictionary<string, object>, DataContext)

Update records applying expressions and default values.

public Task<FormLetter> UpdateAsync(FormElement formElement, Dictionary<string, object> values, DataContext dataContext)

Parameters

formElement FormElement
values Dictionary<string, object>

Values to be inserted.

dataContext DataContext

Returns

Task<FormLetter>

Events

OnAfterDeleteAsync

public event AsyncEventHandler<FormAfterActionEventArgs> OnAfterDeleteAsync

Event Type

AsyncEventHandler<FormAfterActionEventArgs>

OnAfterInsertAsync

public event AsyncEventHandler<FormAfterActionEventArgs> OnAfterInsertAsync

Event Type

AsyncEventHandler<FormAfterActionEventArgs>

OnAfterUpdateAsync

public event AsyncEventHandler<FormAfterActionEventArgs> OnAfterUpdateAsync

Event Type

AsyncEventHandler<FormAfterActionEventArgs>

OnBeforeDeleteAsync

public event AsyncEventHandler<FormBeforeActionEventArgs> OnBeforeDeleteAsync

Event Type

AsyncEventHandler<FormBeforeActionEventArgs>

OnBeforeImportAsync

public event AsyncEventHandler<FormBeforeActionEventArgs> OnBeforeImportAsync

Event Type

AsyncEventHandler<FormBeforeActionEventArgs>

OnBeforeInsertAsync

public event AsyncEventHandler<FormBeforeActionEventArgs> OnBeforeInsertAsync

Event Type

AsyncEventHandler<FormBeforeActionEventArgs>

OnBeforeUpdateAsync

public event AsyncEventHandler<FormBeforeActionEventArgs> OnBeforeUpdateAsync

Event Type

AsyncEventHandler<FormBeforeActionEventArgs>