/// <summary> /// Register Provider. /// </summary> /// <param name="modelProvider">modelProvider Insert Model information Provider</param> /// <returns>Registered activity information.</returns> public SOFTTEK.SCMS.Entity.FA.Provider RegisterProvider(SOFTTEK.SCMS.Entity.FA.Provider modelProvider) { SOFTTEK.SCMS.Entity.FA.Provider modelInsert = new SOFTTEK.SCMS.Entity.FA.Provider(); return(context.Execute(() => { using (dataSource = new FAMDataContext(context.SecurityContext)) { dataSource.ConnectionString = "SRA"; dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"]; dataSource.Initialize(); var result = dataSource.InsertProvider(modelProvider); modelInsert = result; } return modelInsert; }, "Register an Provider in system")); }