Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2cbb867
Update readme
Apr 15, 2020
d60fbf4
Update for VB
Apr 20, 2020
a37f6e0
Rename API
Apr 20, 2020
2a5a0a3
Update readme
Apr 20, 2020
7d152c6
Source auto update [skip ci]
Apr 21, 2020
39a5164
Update
Apr 21, 2020
9c06bf2
Source auto update [skip ci]
Apr 24, 2020
6f141c3
update readme
May 18, 2020
6118d11
Source auto update [skip ci]
May 19, 2020
c629f4d
Update readme
May 29, 2020
ceaf6f9
Source auto update [skip ci]
Aug 28, 2020
e93223e
Source auto update [skip ci]
Oct 16, 2020
4d5a61b
Source auto update [skip ci]
Nov 25, 2020
63fa513
Fix T952445
dxmi Nov 25, 2020
cee4b20
Source auto update [skip ci]
Nov 25, 2020
25010ed
Please VB
dxmi Nov 25, 2020
5e5c80e
Source auto update [skip ci]
Nov 25, 2020
f6a727a
Source auto update [skip ci]
Jan 19, 2021
2aecf68
Source auto update [skip ci]
Mar 16, 2021
ed36b5f
Source auto update [skip ci]
Apr 28, 2021
11ebb11
Source auto update [skip ci]
Jul 6, 2021
bd1fc2b
README auto update [skip ci]
Aug 27, 2021
38e604b
Source auto update [skip ci]
Dec 31, 2021
b5fc7a3
Source auto update [skip ci]
Jun 18, 2022
4ab2cc6
Source auto update [skip ci]
Oct 26, 2022
6462fbd
Source auto update [skip ci]
Apr 12, 2023
c54c4ba
README auto update [skip ci]
Apr 20, 2023
b07cce3
XPO
AndreyKozhevnikov Apr 20, 2023
0cf3571
EF
AndreyKozhevnikov Apr 21, 2023
95e5eb8
update links
AndreyKozhevnikov Apr 21, 2023
f76caf9
Update NonPersistentFiltering.sln
AndreyKozhevnikov Jun 29, 2023
36293c6
Update NonPersistentFilteringEF.sln
AndreyKozhevnikov Jun 29, 2023
134932f
update readme
AndreyKozhevnikov Nov 8, 2023
2d4b887
README auto update [skip ci]
Nov 8, 2023
543830d
Update readme.md
AndreyKozhevnikov Nov 29, 2023
7dfc9ad
Update readme.md
NikolaevaIrina Apr 10, 2024
fb86fd7
Update readme.md
NikolaevaIrina Apr 10, 2024
bcc04f9
Update readme.md
NikolaevaIrina Apr 11, 2024
71cb95b
Apply suggestions from code review
NikolaevaIrina Apr 19, 2024
084fc97
Update readme.md
NikolaevaIrina Apr 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions .editorconfig

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
CSOld/

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(DevExpress.ExpressApp.Blazor.BlazorApplication).Assembly }">
<Found Context="routeData">
<RouteView RouteData="@routeData" />
</Found>
<NotFound>
<LayoutView>
<PageTitle>Not found</PageTitle>
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.ApplicationBuilder;
using DevExpress.ExpressApp.Blazor;
using DevExpress.ExpressApp.SystemModule;
using NonPersistentFilteringEF.Module.BusinessObjects;
using Microsoft.EntityFrameworkCore;
using DevExpress.ExpressApp.EFCore;

namespace NonPersistentFilteringEF.Blazor.Server;

public class NonPersistentFilteringEFBlazorApplication : BlazorApplication {
public NonPersistentFilteringEFBlazorApplication() {
ApplicationName = "NonPersistentFilteringEF";
CheckCompatibilityType = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
DatabaseVersionMismatch += NonPersistentFilteringEFBlazorApplication_DatabaseVersionMismatch;
}
protected override void OnSetupStarted() {
base.OnSetupStarted();
#if DEBUG
if(System.Diagnostics.Debugger.IsAttached && CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema) {
DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
}
#endif
}
private void NonPersistentFilteringEFBlazorApplication_DatabaseVersionMismatch(object sender, DatabaseVersionMismatchEventArgs e) {
#if EASYTEST
e.Updater.Update();
e.Handled = true;
#else
if(System.Diagnostics.Debugger.IsAttached) {
e.Updater.Update();
e.Handled = true;
}
else {
string message = "The application cannot connect to the specified database, " +
"because the database doesn't exist, its version is older " +
"than that of the application or its schema does not match " +
"the ORM data model structure. To avoid this error, use one " +
"of the solutions from the https://www.devexpress.com/kb=T367835 KB Article.";

if(e.CompatibilityError != null && e.CompatibilityError.Exception != null) {
message += "\r\n\r\nInner exception: " + e.CompatibilityError.Exception.Message;
}
throw new InvalidOperationException(message);
}
#endif
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System.ComponentModel;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.DC;
using DevExpress.ExpressApp.Model;
using DevExpress.ExpressApp.Editors;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Updating;
using DevExpress.ExpressApp.Model.Core;
using DevExpress.ExpressApp.Model.DomainLogics;
using DevExpress.ExpressApp.Model.NodeGenerators;
using DevExpress.Persistent.BaseImpl.EF;

namespace NonPersistentFilteringEF.Blazor.Server;

[ToolboxItemFilter("Xaf.Platform.Blazor")]
// For more typical usage scenarios, be sure to check out https://docs.devexpress.com/eXpressAppFramework/DevExpress.ExpressApp.ModuleBase.
public sealed class NonPersistentFilteringEFBlazorModule : ModuleBase {
public NonPersistentFilteringEFBlazorModule() {
}
public override IEnumerable<ModuleUpdater> GetModuleUpdaters(IObjectSpace objectSpace, Version versionFromDB) {
return ModuleUpdater.EmptyModuleUpdaters;
}
public override void Setup(XafApplication application) {
base.Setup(application);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Folder Description

The "Controllers" project folder is intended for storing Blazor-specific Controller classes
that can change the default XAF application flow and add new features.


Relevant Documentation

Controllers and Actions
https://docs.devexpress.com/eXpressAppFramework/112623

Implement Custom Controllers
https://docs.devexpress.com/eXpressAppFramework/112621

Define the Scope of Controllers and Actions
https://docs.devexpress.com/eXpressAppFramework/113103

Ways to Show a View
https://docs.devexpress.com/eXpressAppFramework/112803

Ways to Implement Business Logic
https://docs.devexpress.com/eXpressAppFramework/113710

Debugging, Unit and Functional Testing
https://docs.devexpress.com/eXpressAppFramework/112572
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Folder Description

This project folder is intended for storing custom Blazor List Editors,
Property Editors and View Items.


Relevant Documentation

Using a Custom Control that is not Integrated by Default
https://docs.devexpress.com/eXpressAppFramework/113610

Ways to Access UI Elements and Their Controls
https://docs.devexpress.com/eXpressAppFramework/120092

Views
https://docs.devexpress.com/eXpressAppFramework/112611

List Editors
https://docs.devexpress.com/eXpressAppFramework/113189

View Items
https://docs.devexpress.com/eXpressAppFramework/112612

Debugging, Unit and Functional Testing
https://docs.devexpress.com/eXpressAppFramework/112572
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Application>
<NavigationItems NavigationStyle="Accordion">
</NavigationItems>
<Views DefaultListEditor="DevExpress.ExpressApp.Blazor.Editors.DxGridListEditor">
</Views>
</Application>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<Deterministic>false</Deterministic>
<AssemblyVersion>1.0.*</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Configurations>Debug;Release;EasyTest</Configurations>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<None Remove="Model.xafml" />
</ItemGroup>
<ItemGroup>
<Content Include="Model.xafml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="DevExpress.ExpressApp.Blazor" Version="22.2.5" />
<PackageReference Include="DevExpress.ExpressApp.CodeAnalysis" Version="22.2.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NonPersistentFilteringEF.Module\NonPersistentFilteringEF.Module.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@page "/"
@namespace NonPersistentFilteringEF.Blazor.Server
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using DevExpress.ExpressApp.Blazor.Components

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, shrink-to-fit=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- meta name="theme-color" content="#000000" -->
<title>NonPersistentFilteringEF</title>
<base href="~/" />
<component type="typeof(BootstrapThemeLink)" render-mode="Static" />
</head>
<body>
@{
string userAgent = Request.Headers["User-Agent"];
bool isIE = userAgent.Contains("MSIE") || userAgent.Contains("Trident");
}
@if(isIE) {
<link href="css/site.css" rel="stylesheet" />
<div class="d-flex flex-column justify-content-center align-items-center h-100">
<div class="d-flex">
<img class="mt-2 mr-4" src="_content/DevExpress.ExpressApp.Blazor/images/Sad.svg" width="60" height="60" />
<div>
<div class="h1">Internet Explorer is not supported.</div>
<p style="font-size: 1rem; opacity: 0.75;" class="m-0">NonPersistentFilteringEF cannot be loaded in Internet Explorer.<br>Please use a different browser.</p>
</div>
</div>
</div>
}
else {
<component type="typeof(SplashScreen)" render-mode="Static" param-Caption='"NonPersistentFilteringEF"' param-ImagePath='"images/SplashScreen.svg"' />

<link href="_content/DevExpress.ExpressApp.Blazor/styles.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />
<script src="_content/DevExpress.ExpressApp.Blazor/scripts.js"></script>

<app class="d-none">
<component type="typeof(App)" render-mode="Server" />
</app>

<component type="typeof(AlertsHandler)" render-mode="Server" />

<div id="blazor-error-ui">
<component type="typeof(BlazorError)" render-mode="Static" />
</div>

<script src="_framework/blazor.server.js"></script>
}
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System.Reflection;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Blazor.DesignTime;
using DevExpress.ExpressApp.Blazor.Services;
using DevExpress.ExpressApp.Design;
using DevExpress.ExpressApp.Utils;

namespace NonPersistentFilteringEF.Blazor.Server;

public class Program : IDesignTimeApplicationFactory {
private static bool ContainsArgument(string[] args, string argument) {
return args.Any(arg => arg.TrimStart('/').TrimStart('-').ToLower() == argument.ToLower());
}
public static int Main(string[] args) {
if(ContainsArgument(args, "help") || ContainsArgument(args, "h")) {
Console.WriteLine("Updates the database when its version does not match the application's version.");
Console.WriteLine();
Console.WriteLine($" {Assembly.GetExecutingAssembly().GetName().Name}.exe --updateDatabase [--forceUpdate --silent]");
Console.WriteLine();
Console.WriteLine("--forceUpdate - Marks that the database must be updated whether its version matches the application's version or not.");
Console.WriteLine("--silent - Marks that database update proceeds automatically and does not require any interaction with the user.");
Console.WriteLine();
Console.WriteLine($"Exit codes: 0 - {DBUpdaterStatus.UpdateCompleted}");
Console.WriteLine($" 1 - {DBUpdaterStatus.UpdateError}");
Console.WriteLine($" 2 - {DBUpdaterStatus.UpdateNotNeeded}");
}
else {
DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.Latest;
IHost host = CreateHostBuilder(args).Build();
if(ContainsArgument(args, "updateDatabase")) {
using(var serviceScope = host.Services.CreateScope()) {
return serviceScope.ServiceProvider.GetRequiredService<DevExpress.ExpressApp.Utils.IDBUpdater>().Update(ContainsArgument(args, "forceUpdate"), ContainsArgument(args, "silent"));
}
}
else {
host.Run();
}
}
return 0;
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder => {
webBuilder.UseStartup<Startup>();
});
XafApplication IDesignTimeApplicationFactory.Create() {
IHostBuilder hostBuilder = CreateHostBuilder(Array.Empty<string>());
return DesignTimeApplicationFactoryHelper.Create(hostBuilder);
}
}
Loading