Lighter.NET
1.18.0
dotnet add package Lighter.NET --version 1.18.0
NuGet\Install-Package Lighter.NET -Version 1.18.0
<PackageReference Include="Lighter.NET" Version="1.18.0" />
<PackageVersion Include="Lighter.NET" Version="1.18.0" />
<PackageReference Include="Lighter.NET" />
paket add Lighter.NET --version 1.18.0
#r "nuget: Lighter.NET, 1.18.0"
#:package Lighter.NET@1.18.0
#addin nuget:?package=Lighter.NET&version=1.18.0
#tool nuget:?package=Lighter.NET&version=1.18.0
Lighter.NET
- A tiny innovative library to improve the developemnt of asp.net core application including front-end and back-end works.
- This project aims to make more sense to the current asp.net core application development.
- The Lighter.NET is intended to be used together with Lighter.NET.DB nuget package which provides a light-weighted ORM utilizing EntityFramework 6.4.4 but more simplified.
With Lighter.NET, you can:
- Say Goodbye to the notorious ViewData and ViewBag.
- Say Goodby to the long-winded Entity Data Model file structures, such as *.edmx, *.Context.tt, *.Designer.cs, and unecessary DbSet for db table mapping.
- Say Goodbye to ever changing HtmlHelper or TagHelper as .NET version rapidly increasing.
- Say Hello to a more clean, concise and elegant front-end and back-end coding style.
- Say Hello to a more joyful and efficient coding experience.
- Say Goodbye to jQuery.
- Say Goodbye to Bootstrap.
Features
- An ApiResult class which unified the return data structure both for client-server API requests and the inter-function calls.
- A ViewModelWrapper for delivering multiple models in a strong type manner between controller and view.
- A series of framework-independant UiComponents for composing and rendering most frequently used html elements both from Views, Controllers or API endpoints.
- Providing an light-weight ORM utilities through Lighter.NET.DB nuget package featuring easy CRUD, data paging, auto logging, partial columns updating, auto-increment column support and much more.
- Providing an enhanced developer-friendly reflection tool kits.
- Providing a more efficient localization mechanism with CompositeLocalizer.
- Providing a series of more flexible and practical DateTime utilities including a MonthlyCalensar and DateTime extension methods.
- Providing an enhanced and simplfied HttpClient helper for interaction with remote APIs.
- Providing a set of IP address utilities which support both general and CIDR IP address range parsing and IP address related funcitons such as comparison, boundary IP address determination, applying netmask to an IP address, determining whether an IP range contains or overlaps with the other, etc..
- A ServerSideEventService that can start Server Side Event(SSE) response session, send messages, data and custom events to the client and control the cancellation and the life cycle of the whole process reliably.
- A TextTemplateParser which is capable of parsing a text template with symbol clamped variable placeholder and applying the data model to fillout the variable placeholder.
- A thread-safe CacheStore which can manage the cached items and their lifetime.
- A toolset for simplifying and enhancing the use of Reflection.
- Some other helpers to simplify common application development works.
- A set of javascript library for client side DOM operations, AJAX oprerations, UI components such as DatePicker, PagingBar, AutoComplete, PopView, Panel, etc. and other client side routine UI interactions.
- A light-weight responsive css framework for responsive design.
Release Notes
Ver. 1.18.0 --- Release Date: 2026/02/04
1. New: A new ServerSideEventService service class that can start Server Side Event(SSE) response session, send messages, data and custom events to the client and control the cancellation and the life cycle of the whole process reliably.
2. Deprecated: The MessageModel.JobName property is deprecated and replaced by the Source property for better semantic.
3. Add: Addting the MessageModel.TimeStamp and MessageModel.Expire properties to improve message tracking and handling ability.
4. Enhance: Enhancing the ValidationHelper and adding PatternPassword_Letter_Symbol_Number and PatternPassword_Upper_and_Lower_Letter_Number regular expressio pattern for complex password matching.
5. Change: The Table<T>.UseCustomJsSubmitHandler defaults to true which means it is now the reponsibility of the client side to specify the SaveURL(or saveURL for the client side) property if saving table data change is required.
6. Add: Adding the Table<T>.RenderWithClientScript property which defaults to false to specifiy whether the table initialization javascript code should be rendered together with the <table> HTML.
7. Change: The ListOfTExtension.Remove<T>() now return the removed item instead of a boolean flag. Note that modification for existing code might be required.
8. Add: Adding the PropertyInfoMore.StringLength property to expose the StringLengthAttribute defined for the underlining property.
Ver. 1.17.3 --- Release Date: 2026/01/19
1. Obsolete: There are seven List<Column<TDataModel>>.Add() extension methods obsoleted becuase they could be replaced by the List<Column<TDataModel>>.Add(columnSelector, columnSetter) and become unnecessary.
2. Enhance: The ValidationHelper.CheckEmail() is enhanced to support email address with IDN ccTLD(Internationalized Domain Name country code Top-Level Domain) domain name.
3. Add: Column.NullText and Column.NullOrEmptyText properties for alternative display text when the data model property value is null or empty.
4. Add: FileHelper.FormatFilesize() overload method to support TB and PB filesize formatting.
5. Add: A ToString(format) entension method for nullable DateTime type.
6. Add: FormCommand.SaveAs enum item.
Ver. 1.17.2 --- Release Date: 2025/12/18
1. Add: A new ApiResult.IsLighterApiResult property which always true to help client end easily distinguish the Json data of serialized Lighter.NET.ApiResult from regular Json data.
2. Enhance: The ApiResult.StatusCode is now set to 422 for model error result and 500 for error message or exception result when it is not set or set with successful status code.
3. Add: Adding ApiResult.Combine() which combines two ApiResults and return a new combined ApiResult instance leaving the current and combining ApiResults unchanged. It is different from the .Merge() method as the .Merge() changed and return the current ApiResult.
4. New: A new TextTemplateParser which is created to replace the original TextTemplate for better naming semantic. The old TextTemplate is kept workable but is going to be obsoleted.
Ver. 1.17.1 --- Release Date: 2025/12/10
1. Fix: Fixed the bug of TextTemplate.Parse() which could cause IndexOutOfRange exception.
2. Enhance: The TextTemplate now support to parse and populate variable placeholder by both Name and DisplayName (Name of DisplayAttribute) of a property of the data model which can be specified in the constructor of the TextTemplate.
3. Enhance: The TextTemplate now has a .Populate() overload method to fill data items into template variabe placeholders directly from a key-value pair collection without needing to define a data model.
4. Add: Adding ToSelectListItem() extension method to convert list of OptionItem to list of Microsoft.AspNetCore.Mvc.Rendering.SelectListItem for convinience of UI rendering.
5. Add: Adding DisplayName and ShortDisplayName properties to PorpertyInfoMore and MetaProperty classes.
6. Add: Adding AddMessage(), overload AddException() and Merge() methods to ApiResult.
Ver. 1.17.0 --- Release Date: 2025/10/30
1. Add: IPHelper, a IP address helper utilities to deal with IP Address related operations such as comparing ip addresses, applying netmask to an ip address, getting high-bound and low-bound ip address of a sub-network, parsing ip address family etc..
2. Add: IPAddressRange class to deal with ip address range related functions, such as parsing ip range expression to its corresponding NetworkID, StartAddress, EndAddress and NetMask properties, supporting CIDR format, determining whether an ip range contains or overlap with the other etc.
3. Add: SecurityAttribute class for defining access control policy of APIs or function methods using Attribtue-based Access Control (ABAC) methodology.
4. Add: QuantityAllocator class which can be used to allocate or distribute a numaric quantity among an array of numaric placeholder elements.
5. Add: BinaryHelper, a helper utilities to deal with binary operations and conversions such as converting byte array to 0 and 1 bit expression string.
6. Add: FunctionItem class for defining functional items of an application which enables role-based access control and UI function menu creation.
7. Add: PropertyInfoMore.MaxLength, PropertyInfoMore.MinLength, PropertyInfoMore.Range and PropertyInfoMore.RegularExpression to expose the incorporated Attribute of the underlining PropertyInfo.
8. Add: UniqueGroupAttribute.State property and SetState() method to allow handler to tag the attribute (ex. "checked") while doing validation and to avoid repeating validation.
9. Add: UiComponent.Table.Caption property which will be rendered as html caption tag within the table.
10. Add: New Sortable and Searchable properties are added to Column class to support table sorting and filtering function. When specified for table columns, "data-sortable" and "data-searchable" attribute will be rendered to the table column elements.
11. Add: CacheStore.Pick() to get the cached item without extending its lifetime.
12. Add: CacheItem.StartTime and .ExpireTime read only properties to support more detail monitoring for cached items.
13. Change: Several changes of TableOfT (1)the SubmitActionName property is obsoleted and is replaced by SaveURL property (2) the RowSelectEventHandler and RowCommandEventHandler are not mandatory now when CanEdit/CanAdd is set true. The client side script is now responsible for setting the handler function for the row-related events.
14. Fix: CacheStore.Clean() multi-threading safety issue.
Ver. 1.16.3 --- Release Date: 2025/03/10
1. Add: PropertyInfoMore.RequiredWhen, PropertyInfoMore.RequiredWhenAny and PropertyInfoMore.RequiredWhenAll which indicate whether a property is decorated with the corresponding Attribute.
Ver. 1.16.2 --- Release Date: 2025/03/10
1. Add: UiComponents.StyleSelector to enable easily change UI element style depending on different value/text conditions or predicate result.
2. Add: UiComponents.AlternativeStyler to enable easily style a list of UI element alternatively.
3. Add: RequiredWhenAttribute, RequiredWhenAnyAttribute, RequiredWhenAllAttriubte to indicate whether a property value is required depending on whether the other or others having value or not.
4. Add: IMetaModel.AsRenderable() extension method to simplify converting any data model with IMetaModel interface to be able to render their properies as HTML tags.
5. Fix: Fixed the false negative result of PropertyInfoMore.IsNullable for string? type property.
Ver. 1.16.1 --- Release Date: 2025/03/04
1. Add: DataTableExtension which provide utility methods such as Transpose(), AddTotalRow() to DataTable.
2. Add: A new TypeInfoMore wrapper class of Type which provide extended properies of a data type such as IsNullable, IsInteger, IsNumeric, IsString, IsDateTime, IsBoolean, IsArray, IsEnumerable and UnderlyingType.
3. Fix: Fixed the logical mistake for PropertyInforMore.IsNumeric which giving a false negative result.
Ver. 1.16.0 --- Release Date: 2025/01/24
1. Change: The ApiResult class is change from abstract class to non-abstract class so that the consumer can new a neutral ApiResult then switch it to SuccessResult or FailResult according to the practical logic.
2. Change: The Table.TableClientId property is deprecated. Use the new Table.ClientId instead.
3. Add: ApiResult.SuccessResult() and .FailResult() to return success or fail result to the calling site.
4. Add: UniqueAttribute for annotating a class property as unique whose value should not occur twice among a collection.
5. Add: UniqueGroupAttribute for annotating a group of class properties as unique whose values in composition should not occur twice among a collection.
6. Add: PropertyInfoMore, a more comprehensive property informations that extends the PropertyInfo class and wraps a part of the frequently used properties and methods, intended for a more convinient and efficient type reflection codes.
7. Add: PrimitiveTypeName static class of enumeration of all primitive value type names which is intended to reduce the reflection requirement for datatype comparison
8. Add: MenuItem to define a function menu item and to facilitate function menu construction.
9. Add: SerialNumber class for easily and flexibly constructing a formatted serial number based on a customized rule.
10. Add: TagMaker.Repeat() method to simply the repeating ui html elements or content blocks gereration.
11. Add: IEnumerable.ToSeparatedString() extension method to simplify converting enumerable collection to comma (or specified symbol) separated string.
12. Add: DateTime.ToDateString() extension method to simplify getting the date part string of a datetime variable.
Ver. 1.15.1 --- Release Date: 2025/01/08
1. Add: Adding StartDate and EndDate properties to AcademicYear and Semester class.
2. Add: AcademicYear.START_MONTH and AcademicYear.BASE_CALENDAR_YEAR to support customization of AcademicYear calculation.
3. Add: Semester.FIRST_SEMESTER_START_MONTH and Semester.SECOND_SEMESTER_START_MONTH to support customization of Semester calculation.
Ver. 1.15.0 --- Release Date: 2025/01/08
1. Major Change: The IUiElementEntity now has four more important properties of following:
(1) TagName: The html tag name enum
(2) StartTag: The starting or opening tag of an html element including attributes that has been set.
(3) EndTag: The ending or closing tag of an html element or /> for void elements
(4) Parent: The parent element of this element which should be another IUiElementEntity if any.
(5) Children: The children elements of this element if any.
2. Change: ReflectOnce.TryGetValue() and TypeExtension.TryGetValue() methods which return false when the given propertyName argument is not a valid property name instead of throwing exception.
3. Enhance: ReflectOnce.SetValue() and TypeExtension.SetValue() methods now have two more arguments which can specify whether to ignore read-only property and non-exist property
4. Enhance: The YearMonth class now support for different canlendar system other than the Common Era calendar by specifying a calendarBaseYear argument for the constructor or the .Parse() method.
5. Add: ViewModelWrapper.TryGet() which return null or new instance instead of throwing exception when specified model type not exist.
6. Add: ViewModelWrapper.CheckAnyHasValue() and CheckNumber() method to simplify data model property validation.
7. Add: ViewModelWrapper.AddModelError() overload to add ModelStateDictionary into model error list.
8. Add: ViewModelWrapper.AddMessage() overload to simplify arguments.
9. Add: Type.IsIEnumerable() extension method to check if a type variable is of IEnumerable.
10. Add: ListOfTExtension.Add() overload to add multiple items to a list as params argument.
11. New: IUrlHelper.To() extension method to speicify a endpoint url using strong type of the name of Controller and Action method.
12. Add: OptionItemExtension.SetCheckedStatus() to set selected/checked status of OptionItem based on the boolean values of the model properties with the same name as the OptionItem.Value.
13. Add: enum item FormCommand.Reload.
14. Fix: AcademicYear calculation for January.
Ver. 1.14.0 --- Release Date: 2024/10/21
1. New: A new StringFormatAttribute to specify how the property value of an data model should be formatted when converted to string, including the format, text for null, text for boolean value and whether the formatted string should be html encoded or not.
2. New: A new TextTemplate class which can parse a text template which contains variable placeholders and then populate or subsitiute the template with variable values from a data model.
3. Fix: The rendering bug of UiComponent.Label which does no render the css class properly.
Ver. 1.13.2 --- Release Date: 2024/10/21
1. Fix: The rendering bug for the RowCommand button visibility of TableOfT.
Ver. 1.13.1 --- Release Date: 2024/10/16
1. Enhance: The RowCommandOfT now can be rendered as a different HTML element other than button by setting the new TagName property.
2. Enhance: The properties of RowCommandOfT now can be changed prior to its rendering according to the data model of the table row. This is achieved by setting the new Preprocessor property.
Ver. 1.13.0 --- Release Date: 2024/10/14
1. New: A new MonthlyCalendar class to represent the monthly view of a gregorian calendar which can be set to arbitrary year and month.
2. Add: A serial of DateTime extension methods to get relative datetime to a specified datetime, including IsWeekend(), IsWeekday(), ClosestAfterWeekday(), ClosestBeforeWeekday(), NextWeekDay(), PreviousWeekDay(), NextWeek(), PreviousWeek(), FirstDateOfTheMonth(), LastDateOfTheMonth(), FirstDateOfTheYear(), LastDateOfTheYear(), EndOfDateTime(), NextDateTime(), PreviousDateTime(), NextDate(), PreviousDate(), WeekdayName().
3. Change: The YearMonth.Parse() is changed from instance method to static method and please take a note that modification may be required for exsiting codes.
4. Obsolete: The YearMonth.Valid and YearMonth.State properties are absoleted and any invalid year and month value will throw an exception since these version.
5. Obsolete: The YearMonth.FromString() static method is obsoleted. Use the YearMonth.Parse() static method instead.
Ver. 1.12.7 --- Release Date: 2024/10/07
1. Enhance: The return type of ReflectOnce.Bind() method is changed from void to ReflectOnce for better usability.
Ver. 1.12.6 --- Release Date: 2024/10/07
1. Add: A new ReflectOnce class which is used as a wrapper class to do reflection once for the binding object and then providing the reflection related functionality multiple times for improving performance.
Ver. 1.12.5 --- Release Date: 2024/09/27
1. Add: MessageModel.IsHtml property to indicate whether the message content contains HTML.
2. Add: An DateTime.ToString() extension method to trim out the ending zero time digits after formatting.
Ver. 1.12.4 --- Release Date: 2024/09/16
1. Fix: UiComponent.CheckBox shows wrong checked state problom is fixed. A new ValueType property is added to classify the value CheckBox into Boolean (default) or String type. When boolean type, the value of CheckBox will always be "true". When string type, the Value property is used.
Ver. 1.12.3 --- Release Date: 2024/09/13
1. New: StringLineBuilder which is a wrapper class of StringBuilder for providing additional LineCount, SpaceLineCount and NonSpaceLineCount properties and PrependLine() method.
Ver. 1.12.2 --- Release Date: 2024/09/13
1. Add: (List of T).Add() extension method to add new item which is intialized using anonymous expression.
Ver. 1.12.1 --- Release Date: 2024/09/13
1. Modified: The type of RowCommamnds property of UiComponents.TableOfT is changed from RowCommand to generic RowCommand of TDataModel to simplify the visibility and disabled state control for row command buttons.
2. Fix: UiComponent.PagingBar client mode behavior.
3. Add: UiComponent.Password to render input type="password" html tag.
4. Add: IUiElement.RenderHTML extension method to render tag expression of IHtmlContent on Razor page.
5. Add: (List of T).SetItem() extension method to set each item of list using anonymous expression.
Ver. 1.12.0 --- Release Date: 2024/09/04
1. Add: Lighter.NET.Security.EncryptHelper for general encyption and decryption operations using DES and AES algorisms.
Ver. 1.11.3 --- Release Date: 2024/09/02
1. Add: FormCommand.Keep, FormCommand.TempStore enum items.
Ver. 1.11.2 --- Release Date: 2024/09/02
1. Add: FormCommand.Edit enum item.
2. Add: TypeExtension.SetValue() method to set class instance property value based on literal property name for some use case where the dot notation assignment is not applicable.
Ver. 1.11.1 --- Release Date: 2024/08/29
1. Add: RowCommand.CommandVisible predicate property to dynamically control the visibility of command button in table row.
Ver. 1.11.0 --- Release Date: 2024/08/27
1. Add: CheckBoxList, RadioButton, RadioButtonList in Lighter.NET.UiComponent.
2. Fix: fix the typo UiElementBase.WidthName to .WithName.
Ver. 1.10.1 --- Release Date: 2024/08/20
1. Change: The cell text alignment css class is changed from center/left/right to text-center/text-left/text-right for UiComponents.TableOfT.
2. Add: ChangeListJsonArgumentName property of UiComponents.TableOfT which will be used as argument name when post the changed list json (after table editing) back to controller action.
Ver. 1.10.0 --- Release Date: 2024/06/19
1. New YearMonth custom data type to deal with Year-Month data.
2. Adding Object.ToJson() extension method to convert object to json string which is commonly used as a client javascript variable value.
3. Adding Object.ToBase64() extension method to convert object to base64 string which is commonly used as a html data attribute value.
4. Adding TableOfT.ExcludeColumns() to exclude non-interested columns.
5. Fix the row number of TableOfT when paging is applied.
6. Fix some UiComponents that missing the style and other attributes when rendering html tag.
Ver. 1.9.1 --- Release Date: 2024/04/16
1. New FilterDataName and FilterDataValue properties for Lighter.NET.Common.OptionItem for filtering interested options form a list of options.
2. The Lighter.NET.UiComponent.Select will render data-filter-filtername in its option tag so that client side javascript could utilize it to filter options.
3. EnumHelper.ConvertToOptionList now accepts an useEnumNameAsExtraData argument that will make the resulting Option item with enum name as extra option data.
Ver. 1.9.0 --- Release Date: 2024/04/10
1. New CheckBoxEnabler property for TableOfT to conditionally enable or disable the row select checkbox based on the model state.
2. New CommandEnabler property for RowCommand to conditionally enable or disable the row command button based on the model state.
3. A data-datatype attribute is now rendered in the html tag for all UiComponents which would be useful for data model retrieval.
4. Bug fix for TypeExtension.IsNullableType().
5. Critical Updates (which require modification of exsiting codes) for font-end lighter.js are listed below:
(1) All function names from lighter.js now start with or renamed to (would impact exsiting codes) $ prefix like $SomeFunction() and this will be the naming convention for future lighter.js development.
(2) All global variables or constants from lighter.js now start with $$ prefix like $$SomeVariable and this will be the naming convention for future lighter.js development.
(3) The FetchJson() function is renamed to $Fetch() which would widely impact exsiting codes.
(4) The ShowFetchJsonFailMessage() is renamed to $ShowFetchFailMessage() which would widely impact exsiting codes.
6. New $Plural() is introduced to lighter.js to simplify message wording for plural issue.
7. New $BadgeObject() and $LighterObject.badge() method provide the ability to add a badge label for information highlighting on the top-right corner of any visual DOM element.
8. New $PanelObject() is introduced to simplify the usage of Panel block as ui partial view.
Ver. 1.8.0 --- Release Date: 2024/03/20
Add some FileHelper methods, such as Exists(), IsFile(), IsDirectory(), CanRead(), CanWrite(), ReverseReadLines() and ReverseReadBytes().
Ver. 1.7.1 --- Release Date: 2024/03/12
1. Fix: Lighter.NET.UiComponent.TableOfT's column width for RowCommands column.
2. Enhancement for Lighter.NET.UiComponent.Label and LabelS to ensure the required star symbol being displayed in red color by using label-star css class.
Ver. 1.7.0 --- Release Date: 2024/03/10
1. Lighter.NET.UiComponent.TableOfT now support header column grouping.
2. Updates of front-end lighter.js including following:
(1) $TableObject now support header column groupping, reponsive column display mode and more table events including onRowAdd, onRowEdit, onFieldChanged, onSaveSuccess and onSaveFail.
(2) $EventHub() enhancement for integration of custom and build-in events processing.
(3) $ArrayUtilObject() now supports more array processing methods such as append, insert, remove, replace, etc..
Ver. 1.6.0 --- Release Date: 2024/02/20
1. Upgrading front-end lighter.js and lighter.css for followings:
(1) Introducing a new $PopupView() factory funciton to make any html element (mainly form element) capable to popup as a modal view for user inputs.
(2) Introducing Lighter Navbar to provide easy creation of navigation bar and menu items.
(3) New $SlideIn() and $SlideOut() to achieve collapsing and expanding effect of any DOM element with or wrapping with .sliding-container css class.
(4) New $Spinner() which accept a onCloseCallback to be executed when spinner is closed.
(5) New onScrollOver(), onScrollToBottom(), onScrollToTop() event handler for $LighterObject for triggering callback when the target element is scrolled to specific height position.
(6) The $LighterObject.autoComplete() introducing new arguments to support user input which is not included in the auto-complete list items.
Ver. 1.5.3 --- Release Date: 2024/01/17
1. Add a ClientRowUpdateItem class to carry definition and row data to client end for patial table UI updating.
2. Add data-field-datatype and data-field-format attribute to the rendered thead >th tag of the TableOfT UiComponent to improve partial update capability for table rows.
3. Fix ApiResult constructor resulting with an empty Message problem.
Ver. 1.5.2 --- Release Date: 2024/01/16
1. Enhancement for Lighter.NET.UiComponent.TableOfT, adding data-key-datatype attribute to rendered checkbox of row selection that would improve the model binding correctness when the selected key passed to controler action as json content-type.
2. A CombineObjects() utility function has been added to lighter.js which simply the combination of multiple objects or HTMLFormElements into single JS object which could be converted to json content-type to pass to server side.
3. Minor improvement for $TableObject and $PagingBarObject of lighter.js
Ver. 1.5.1 --- Release Date: 2024/01/15
1. The TableOfT UiComponent has a new CheckBoxForAll property which determines whether to show a checkbox on the header column to check or uncheck all rows.
2. The TableOfT UiComponent has a new ShowRowNo property which is intended to replace the AutoSerialNo property for better semantic.
3. Enhancement for front-end lighter.js for following:
(1) A new $PopupFormObject has been introduced in the lighter.js to popup any HTMLElement mainly for HTMLFormElement in a showMoal() mode.
(2) A new set of css style for Panel style content has been introduced in the lighter.css.
(3) $TableObject will check for first and second columns for the existance of row selection checkbox.
(4) The ConvertToFormData() function introduces a new includeExtraData argument which would include extra key-value pair from data-extra-name and data-extra-value attribute of SELECTED option into resulting FormData.
Ver. 1.5.0 --- Release Date: 2024/01/09
1. Add: Lighter.NET.Helper.ApiHelper to simplify and ensure the best practice of the use of HttpClient, based on an HttpClientManager that controls the pooling of the underlining HttpHandlers.
2. Add: Lighter.NET.Helper.FormatHelper to simplify formating object form of primitive types.
3. Enhancement for Lighter.NET.UiComponents.TableOfT including following:
(1) Add: new constructor with autoIncludeColumns argument would automatically add all TDataModel properties to Columns of the table.
(2) Add: RowSelectByCheckBox property, an checkbox column will be added at the first column of the table when this property set true.
(3) Add: UseCustomJsSubmitHandler property, if true then SubmitActionName could be optional and the submit action should be handled by client javascript handler function.
4. Enhancement for Lighter.NET.PagingSetting including following:
(1) the PageCount, StartRowNo, EndRowNo has become automatically calculated from TotalRowCount and RowsPerPage.
(2) Add: ShowRecordInfo proerty, a record information of the current data page (ex. Showing m to n of rowCount entries) will be shown when this property is set true.
(3) Add: IsClientMode property, the paging bar will control the paging of the binding table totally in client side without needing to update the table rows and paging setting from server side when this property set true.
5. Add: ListOfTExtension.Filter(PagingSetting) method that enables and simplifies the paging opreration for List<T> data list.
6. Add: A generic Lighter.NET.Common.CacheStore features high performance, thread-safty and auto clean up for expired cached items.
7. Fix: Lighter.NET.Common.AcademicYear calculation of the Value property which could go wrong previously.
Ver. 1.4.0 --- Release Date: 2023/10/31
1. Add $LighterObject.autoComplete() method in lighter.js. The autoComplete() features an onCompleteCallback to provide more sophisticated intercation to the matched option, a mustMatch flag to prevent arbitrary input and a support to synonyms lookup.
2. Remove ApiResultHelper
3. Remove DebugMessages from ApiResult
4. Add private _exceptions field and public AddException() and Exceptions() methods to ApiResult to make it capable deliver exception object out to the caller. In the mean while, avoid sensitive security information to be expose to client while doing json serialization.
5. Bug fix for ValidationHelper
Ver. 1.3.0 --- Release Date: 2023/10/17
1. Introduce the $LighterObject to lighter.js for easy client ui element manipulation, such as visibility, style, parent and child element searching and event handling.
2. Introduce $ElementFlag and flag binding functionality to lighter.js which automatively triggers some ui interactive behavior according to target elements flag state.
3. Introduce an $StateMachine to lighter.js for general dynamic state management, such as client side table row editing and batch updating.
4. Introudec an $Map to lighter.js for easy client side dictionary lookup.
5. Adding ContentConverter property for Comlumn of T UiComponent to enhance table column flexibility, for example convert text to hyperlink.
6. Adding HideColumnHeader property for TableOfT UiComponent.
7. Adding CanAdd, CanDelete property for TableOfT, which also enable the data source model list to be combined with the client table object for better client row event handling ability.
8. Adding Step property for DatatimeLocal UiComponent.
9. Adding IsDisabled property for IUiElement.
10. Adding GetValue() extension method for all Class type which enables getting the property value by string of property name.
11. Fixing Column width problem for AutoSerialNo and RowCommnads columns.
12. Enhancement to lighter.css for better rwd effects and adding some ui component style like Step Bar Style.
Ver. 1.2.5 --- Release Date: 2023/09/22
1. New FileHelper.FormatFilesize() to format filesize to GB, MB or KB.
2. Bug fix for ViewModelWrapper to avoid key conflict.
Ver. 1.2.4 --- Release Date: 2023/09/22
1. Add: TextR UiComponent for readonly text input element.
2. Add: SpanText UiComponent for display text element.
Ver. 1.2.3 --- Release Date: 2023/09/20
1. Enhancement of ViewModelWrapper for model value validation.
2. Improvement of UiElements including Date, DateTimeLocal and Label.
3. New UiElement of Month for year and month input.
4. Improvement of ValidationHelper.
Ver. 1.2.2 --- Release Date: 2023/09/20
1. Add StateModel for change tracking of data record
2. Enhancement of LogModel and HttpRequestErrorLogModel for more reasonable and efficient logging information.
3. TableOfT UiComponent now support inline row editing and multiple rows editing and change tracking.
4. Enhancements for UiComponents including ColumnOfT, UiElementBase, Column, CheckBox, Date, DateTimeLocal, Number, Select, Text,TextArea.
Ver. 1.2.1 --- Release Date: 2023/09/08
1. Resolving conflicked files.
Ver. 1.2.0 --- Release Date: 2023/09/08
1. Reconstruct the ViewModelWrapper to inherit from BaseViewModel which can be used to communicate between View and Layout.
2. New PrivacyHelper for privacy protection functions.
3. New PercentWidth for defining width which support basic adding and substraction operation.
Ver. 1.1.0 --- Release Date: 2023/06/28
1. Adding CompositeLocalizer which combining multiple localizers for DataAnnotation localization.
2. Adding javascript libraries and css to facilitate font-end responsive web development.
Ver. 1.0.0 --- Release Date: 2023/06/28
First Release.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Lighter.NET:
| Package | Downloads |
|---|---|
|
Lighter.NET.DB
Lighter.NET.DB is a Lightweight ORM data access layer utilizing Entity Framework 6.5.1. It aims to provide an easy to use and flexsible and more efficient db access experience for developer. With Lighter.NET.DB, you can seamlessly combine ORM and conventional SQL script coding style for data access operations in a concise and efficient manner. Moreover, you can say goodbye to the long-winded Entity Data Model file structures, such as *.edmx, *.Context.tt, *.Designer.cs, and unecessary DbSet for db table mapping. It features the followings: 1. Full select, insert, update, delete support using ORM approach, as well as using conventional SQL script approach. 2. Easy data paging for select result set or even for mass insert or update. 3. Automatic logging for update and delete operation. 4. Simpify the transactional db operations that eliminates all the boilerplate code of using tranaction, try...catch, commit when success and rollback when failure. 5. Auto increment column and Sequence support. 6. A full-featured where condition builder which is easy to use and significanly simplify the complexity when multiple optional filter columns are involved. 7. An improved DbContext dispose mechanism which based on the "Always dispose after usage unless explicitly declaring for reuse" policy. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.18.0 | 148 | 2/4/2026 |
| 1.17.3 | 126 | 1/19/2026 |
| 1.17.2 | 353 | 12/18/2025 |
| 1.17.1 | 495 | 12/10/2025 |
| 1.17.0 | 242 | 10/30/2025 |
| 1.16.3 | 308 | 3/10/2025 |
| 1.16.2 | 264 | 3/10/2025 |
| 1.16.1 | 326 | 3/4/2025 |
| 1.16.0 | 200 | 1/24/2025 |
| 1.15.1 | 196 | 1/8/2025 |
| 1.15.0 | 207 | 1/8/2025 |
| 1.14.0 | 215 | 10/21/2024 |
| 1.13.3 | 191 | 10/21/2024 |
| 1.13.2 | 185 | 10/17/2024 |
| 1.13.1 | 208 | 10/16/2024 |
| 1.13.0 | 202 | 10/13/2024 |
| 1.12.7 | 199 | 10/7/2024 |
| 1.12.6 | 204 | 10/7/2024 |
| 1.12.5 | 206 | 9/27/2024 |
| 1.12.4 | 243 | 9/16/2024 |
1. New: A new ServerSideEventService service class that can start Server Side Event(SSE) response session, send messages, data and custom events to the client and control the cancellation and the life cycle of the whole process reliably.
2. Deprecated: The MessageModel.JobName property is deprecated and replaced by the Source property for better semantic.
3. Add: Addting the MessageModel.TimeStamp and MessageModel.Expire properties to improve message tracking and handling ability.
4. Enhance: Enhancing the ValidationHelper and adding PatternPassword_Letter_Symbol_Number and PatternPassword_Upper_and_Lower_Letter_Number regular expressio pattern for complex password matching.
5. Change: The Table<T>.UseCustomJsSubmitHandler defaults to true which means it is now the reponsibility of the client side to specify the SaveURL(or saveURL for the client side) property if saving table data change is required.
6. Add: Adding the Table<T>.RenderWithClientScript property which defaults to false to specifiy whether the table initialization javascript code should be rendered together with the <table> HTML.
7. Change: The ListOfTExtension.Remove<T>() now return the removed item instead of a boolean flag. Note that modification for existing code might be required.
8. Add: Adding the PropertyInfoMore.StringLength property to expose the StringLengthAttribute defined for the underlining property.