inovationware.code
3.8.9
See the version list below for details.
dotnet add package inovationware.code --version 3.8.9
NuGet\Install-Package inovationware.code -Version 3.8.9
<PackageReference Include="inovationware.code" Version="3.8.9" />
<PackageVersion Include="inovationware.code" Version="3.8.9" />
<PackageReference Include="inovationware.code" />
paket add inovationware.code --version 3.8.9
#r "nuget: inovationware.code, 3.8.9"
#:package inovationware.code@3.8.9
#addin nuget:?package=inovationware.code&version=3.8.9
#tool nuget:?package=inovationware.code&version=3.8.9
Code Repertoire
Code Repertoire is multi-purpose for everyday use in .Net. Following are usage examples.
SequelOrm
Lightweight ORM.
- SqlServer is currently the only supported database provider; this implementation was tested on it.
- Support for PostgreSql and MySql, as well as Logging and Transaction Isolation Levels, are actively WIP.
- Parent-to-child foreign key convention is {ParentTypeName}_{idColumn} (e.g. Person {Id, Name, List(Of Phone)} ⇒ Phone {Id, Person_Id, PhoneNumber}).
- Supports 1 : many (e.g. 1 Person can have many Phones); the rest are actively WIP and may not work as expected if implemented in this version.
- Direct support for Enum types is actively WIP; workaround is to explicitly use Integer instead of the enum property (or string or an appropriate type, if not using the numeric/ordinal value), for instance, if your class contains an enum of AccountType, use public int Account { get; set; } not public AccountType Account { get; set; } (in VB: Public Property Account As Integer, not Public Property Account As AccountType)
- Picks up non read-only properties only, and ignores RowVersion property if it doesnt exist.
- Finally, you may need to install appropriate Sql Clients or Providers from nuget.org, e.g. System.Data.SqlClient.
C#:
using iNovation.Code;
// prerequisites
SupportedDbProvider provider = SupportedDbProvider.SqlServer; // others are WIP
string connectionString = "my connection string";
// the sync version
IOrm orm = SequelOrm.GetInstance(provider, connectionString);
// create a Person object
List<Phone> amyPhoneNumbers = new List<Phone> { new Phone { PhoneNumber = "01 001 AMY" } };
Person amy = new Person { Name = "Amy", Phones = amyPhoneNumbers };
// create a Person record
Person created = orm.Create<Person>(amy);
// find records of Person by sepcified conditions - the paged version
Condition condition = new Condition { Column = "PhoneNumber", SqlComparison = SqlComparisonOperator.SqlEquals, Value = "01 001 AMY" };
Page<Person> sought = orm.FindByPaged<Person>(new List<Condition> { condition }, 1, 10);
// retrieve the results by
List<Person> found = sought.Records;
// for the async version
IOrmAsync ormAsync = SequelOrmAsync.GetInstance(provider, connectionString);
// just call the async version of the methods, e.g.
Person createdByAsync = await ormAsync.CreateAsync<Person>(amy);
// please read the individual classes' documentations for important information.
// the above is based on these entities:
using iNovation.Code;
public class Person {
public int Id { get; set; }
[SqlType("NVARCHAR(100)")]
public string Name { get; set; }
public List<Phone> Phones { get; set; } = new List<Phone>();
public override string ToString()
{
return Name + " (Id: " + Id + ")";
}
public class Phone {
public int Id { get; set; }
public int Person_Id { get; set; }
public string PhoneNumber { get; set; }
public override string ToString()
{
return PhoneNumber;
}
}
VB:
Imports iNovation.Code
' prerequisites
Dim provider As SupportedDbProvider = SupportedDbProvider.SqlServer ' other providers are WIP
Dim connectionString As String = "my connection string"
' the sync version
Dim orm As IOrm = SequelOrm.GetInstance(provider, connectionString)
' create a Person object
Dim amyPhoneNumbers As New List(Of Phone) From {New Phone With {.PhoneNumber = "01 001 AMY"}}
Dim amy As New Person With {.Name = "Amy", .Phones = amyPhoneNumbers}
' create a Person record
Dim created As Person = orm.Create(Of Person)(amy)
' find records of Person by specified conditions - the paged version
Dim conditions As New List(Of Condition) From {New Condition With {.Column = "PhoneNumber", .SqlComparison = SqlComparisonOperator.SqlEquals, .Value = "01 001 AMY"}}
Dim sought As Page(Of Person) = orm.FindByPaged(Of Person)(conditions, 1, 10)
' retrieve the results by
Dim found As List(Of Person) = sought.Records
' for the async version
Dim ormAsync As IOrmAsync = SequelOrmAsync.GetInstance(provider, connectionString)
' just call the async version of the methods, e.g.
Dim personCreatedByAsync As Person = Await ormAsync.CreateAsync(Of Person)(amy)
' please read the individual classes' documentations for important information.
' the above is based on these entities:
Imports iNovation.Code
Public Class Person
Public Property Id As Integer
<SqlType("NVARCHAR(100)")>
Public Property Name As String
Public Property Phones As List(Of Phone) = New List(Of Phone)
Public Overrides Function ToString() As String
Return Name & " (Id: " & Id & ")"
End Function
End Class
Public Class Phone
Public Property Id As Integer
Public Property Person_Id As Integer
Public Property PhoneNumber As String
Public Overrides Function ToString() As String
Return PhoneNumber
End Function
End Class
Bootstrap
Contains methods based on Bootstrap, currently 4 but upgrades are WIP.
C#:
using static iNovation.Code.Bootstrap
Alert("This is an alert");
VB:
Imports iNovation.Code.Bootstrap
Alert("This is an alert")
Charts
Contains methods for dynamically creating charts (Bar, Pie, Doughnut, Line) using given values or directly from database columns.
C#:
using static iNovation.Code.Charts
List<string> labels = new List<string> { "Q1", "Q2", "Q3" };
List<string> values = new List<string> { "50", "25", "75" };
string html = BarChart(labels, values);
VB:
Imports iNovation.Code.Charts
Dim labels As New List(Of String) From {"Q1", "Q2", "Q3"}
Dim values As New List(Of String) From {"50", "25", "75"}
Dim html As String = BarChart(labels, values)
Desktop
Contains methods mainly towards desktop development.
C#:
using static iNovation.Code.Desktoop
enum TitleOfCourtesy{
Mr, Mrs, Ms
}
//binds values of TitleOfCourtesy to comboBox1
EnumDrop(comboBox1, new TitleOfCourtesy());
VB:
Imports iNovation.Code.Desktop
Enum TitleOfCourtesy
Mr
Mrs
Ms
End Enum
' binds values of TitleOfCourtesy to ComboBox1
EnumDrop(ComboBox1, New TitleOfCourtesy())
DesktopExtensions
Contains extension methods based on methods from Desktop.
C#:
using static iNovation.Code.DesktopExtensions
//The items of comboBox1 are turned into a List
comboBox1.ToList();
VB:
Imports iNovation.Code.DesktopExtensions
' The items of ComboBox1 are turned into a List
ComboBox1.ToList()
Encryption
Ligthweight Encryption/Decryption.
C#:
using static iNovation.Code.Encryption
string key = "MyKey";
string value = "What to encrypt";
string encrypted = Encrypt(key, value);
string original = Decrypt(key, encrypted);
VB:
Imports iNovation.Code.Encryption
Dim key As String = "MyKey"
Dim value = "What to encrypt"
Dim encrypted As String = Encrypt(key, value)
Dim original As String = Decrypt(key, encrypted)
EncryptionExtensions
Contains extension methods based on methods from Encryption.
C#:
using static iNovation.Code.EncryptionExtensions
string key = "MyKey";
string value = "What to encrypt";
string encrypted = value.Encrypt(key);
string original = encrypted.Decrypt(key);
VB:
Imports iNovation.Code.EncryptionExtensions
Dim key As String = "MyKey"
Dim value = "What to encrypt"
Dim encrypted As String = value.Encrypt(key)
Dim original As String = value.Decrypt(key)
Feedback
Contains routines for giving feedback with Text-To-Speech and MessageBox.
C#:
using iNovation.Code.Feedback
//Text to speech
string s = "Hi";
Feedback feedback = new Feedback();
feedback.Inform(s);
VB:
Imports iNovation.Code.Feedback
' Text to speech
Dim s As String = "Hi"
Dim f As New Feedback()
f.Inform(s)
FeedbackExtensions
Contains extension methods based on methods from Feedback.
C#:
using iNovation.Code.FeedbackExtensions
//Text to speech
string s = "Hi";
s.Inform();
VB:
Imports iNovation.Code.FeedbackExtensions
' Text to speech
Dim s As String = "Hi"
s.Inform()
General
Contains methods for general purposes.
C#:
using static iNovation.Code.General
string email = "@provider.com";
bool valid = IsEmail(email); //false
VB:
Imports iNovation.Code.General
Dim email As String = "@provider.com"
Dim valid = IsEmail(email) ' False
GeneralExtensions
Contains extension methods based on methods from General.
C#:
using static iNovation.Code.GeneralExtensions
string input = "how Are you doing";
string output = input.ToTitleCase(); //How Are You Doing
VB:
Imports iNovation.Code.GeneralExtensions
Dim input As String = "how Are you doing"
Dim output = input.ToTitleCase() ' How Are You Doing
LoggingExtensions
Contains extension methods useful for logging common data types.
C#:
using static iNovation.Code.LoggingExtensions
string input = "just a log";
input.Log();
VB:
Imports iNovation.Code.LoggingExtensions
Dim input As String = "just a log"
input.Log()
Machine
Contains methods for dealing with the machine directly.
C#:
using static iNovation.Code.Machine
//Mutes the PC
Mute(this);
VB:
Imports iNovation.Code.Machine
' Mutes the PC
Mute(Me)
Sequel
Contains methods for database access.
C#:
using static iNovation.Code.Sequel
string table = "TableName";
string[] fields = { "ColumnName" };
string[] where_params = { "Id" };
object[] where_params_values = { "Id", 10 };
string connection_string = "Connection_String";
//creates select query
string query = iNovation.Code.General.BuildSelectString(table, fields, where_params);
//creates a DataTable
DataTable dataTable = QDataTable(query, connection_string, where_params_values);
VB:
Imports iNovation.Code.Sequel
Dim table As String = "TableName"
Dim fields As String() = {"ColumnName"}
Dim where_params As String() = {"Id"}
Dim where_params_values As Object() = {"Id", 10}
Dim connection_string As String = "Connection_String"
' creates select query
Dim query As String = iNovation.Code.General.BuildSelectString(table, fields, where_params)
' creates a DataTable
Dim d As DataTable = QDataTable(query, connection_string, where_params_values)
Styler
Contains methods for desktop development, particularly, styling the Form.
C#:
using static iNovation.Code.Styler
Style(this, true);
VB:
Imports iNovation.Code.Styler
Style(Me, True)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
- Microsoft.Bcl.AsyncInterfaces (>= 1.0.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Collections.Immutable (>= 1.7.1)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.5.3)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on inovationware.code:
| Package | Downloads |
|---|---|
|
inovation.incode
Private |
|
|
SecurityAdapter
Description |
|
|
inovationware.securityAdapter
Private |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.9.0 | 215 | 5/31/2025 | |
| 3.8.9 | 278 | 5/4/2025 | |
| 3.7.1 | 208 | 1/15/2025 | |
| 3.7.0 | 244 | 11/23/2024 | |
| 3.6.8 | 225 | 10/24/2024 | |
| 3.6.7 | 214 | 10/20/2024 | |
| 3.6.6 | 236 | 10/17/2024 | |
| 3.6.5 | 200 | 9/20/2024 | |
| 3.6.4 | 226 | 9/20/2024 | |
| 3.6.3 | 218 | 9/20/2024 | |
| 3.6.2 | 209 | 9/20/2024 | |
| 3.6.1 | 242 | 9/20/2024 | |
| 3.6.0 | 491 | 1/15/2024 | |
| 3.5.9 | 537 | 1/11/2024 | |
| 3.5.8 | 484 | 1/7/2024 | |
| 3.5.7 | 466 | 1/6/2024 | |
| 3.5.6 | 488 | 12/23/2023 | |
| 3.5.5 | 482 | 12/21/2023 | |
| 3.5.4 | 499 | 12/20/2023 | |
| 3.5.3 | 485 | 12/20/2023 |
Code is now running .Net Framework 4.7.2