public override void Add(TDataModel entity) { try { var identityPropertyInfo = ConfigureFramework.GetIdentityPropertyInfoModelTypes(typeof(TDataModel).GetHashCode()); SetIdentityValueToDefaultValue(entity, identityPropertyInfo); Repository.Add(entity); Save(); } catch (GenericRepositoryException ex) { throw ex; } catch (Exception ex) { throw new ServiceLayerException("An error occured while inserting entity !", ex); } }
public static void Initialize(this IServiceCollection services) { InitializeFilters(services); ConfigureFramework.Initialize(services); }