internal static ResponseEnvelopeWithDataResult <BaseDataModel> GetDataModelByGuid(Guid id)
 {
     return(new ResponseEnvelopeWithDataResult <BaseDataModel>()
     {
         DataResult = InputFieldConfigurationManager.GetEntityFromGuid(id).ConvertToDataModel()
     });
 }
        internal static ResponseEnvelope DeleteEntity(InputFieldConfigurationDataModel model)
        {
            if (model == null)
            {
                return(new ResponseEnvelope(new Exception("Parameter 'model' is empty")));
            }
            InputFieldConfiguration entity = InputFieldConfigurationManager.GetEntityFromGuid(model.Id);

            return(InputFieldConfigurationManager.Delete(entity));
        }
        internal static ResponseEnvelope UpdateEntity(InputFieldConfigurationDataModel model)
        {
            if (model == null)
            {
                return(new ResponseEnvelope(new Exception("Parameter 'model' is empty")));
            }
            InputFieldConfiguration entity = InputFieldConfigurationManager.GetEntityFromGuid(model.Id);

            entity.UpdateFromModel(model);
            entity.DateLastModified = DateTime.Now;
            return(InputFieldConfigurationManager.Update());
        }