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
IEntityRepositoryformFileService
FormFileServicefieldValidationService
FieldValidationServiceauditLogService
AuditLogServicelocalizer
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
FormElementprimaryKeys
Dictionary<string, object>Primary keys to delete records on the database.
dataContext
DataContext
Returns
InsertAsync(FormElement, Dictionary<string, object>, DataContext, bool)
public Task<FormLetter> InsertAsync(FormElement formElement, Dictionary<string, object> values, DataContext dataContext, bool validateFields = true)
Parameters
formElement
FormElementvalues
Dictionary<string, object>dataContext
DataContextvalidateFields
bool
Returns
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
FormElementvalues
Dictionary<string, object>Values to be inserted.
dataContext
DataContext
Returns
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
FormElementvalues
Dictionary<string, object>Values to be inserted.
dataContext
DataContext
Returns
Events
OnAfterDeleteAsync
public event AsyncEventHandler<FormAfterActionEventArgs> OnAfterDeleteAsync
Event Type
OnAfterInsertAsync
public event AsyncEventHandler<FormAfterActionEventArgs> OnAfterInsertAsync
Event Type
OnAfterUpdateAsync
public event AsyncEventHandler<FormAfterActionEventArgs> OnAfterUpdateAsync
Event Type
OnBeforeDeleteAsync
public event AsyncEventHandler<FormBeforeActionEventArgs> OnBeforeDeleteAsync
Event Type
OnBeforeImportAsync
public event AsyncEventHandler<FormBeforeActionEventArgs> OnBeforeImportAsync
Event Type
OnBeforeInsertAsync
public event AsyncEventHandler<FormBeforeActionEventArgs> OnBeforeInsertAsync
Event Type
OnBeforeUpdateAsync
public event AsyncEventHandler<FormBeforeActionEventArgs> OnBeforeUpdateAsync