Add project files.
This commit is contained in:
29
Common.Library/BaseClasses/CommonBase.cs
Normal file
29
Common.Library/BaseClasses/CommonBase.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Common.Library;
|
||||
|
||||
public abstract class CommonBase : INotifyPropertyChanged
|
||||
{
|
||||
#region Constructor
|
||||
protected CommonBase()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Init Method
|
||||
public virtual void Init()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region RaisePropertyChanged Method
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
public virtual void RaisePropertyChanged(string propertyName)
|
||||
{
|
||||
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
5
Common.Library/BaseClasses/EntityBase.cs
Normal file
5
Common.Library/BaseClasses/EntityBase.cs
Normal file
@ -0,0 +1,5 @@
|
||||
namespace Common.Library;
|
||||
|
||||
public class EntityBase : CommonBase
|
||||
{
|
||||
}
|
||||
5
Common.Library/BaseClasses/ViewModelBase.cs
Normal file
5
Common.Library/BaseClasses/ViewModelBase.cs
Normal file
@ -0,0 +1,5 @@
|
||||
namespace Common.Library;
|
||||
public class ViewModelBase : CommonBase
|
||||
{
|
||||
}
|
||||
|
||||
9
Common.Library/Common.Library.csproj
Normal file
9
Common.Library/Common.Library.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
10
Common.Library/Interfaces/IRepository.cs
Normal file
10
Common.Library/Interfaces/IRepository.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Common.Library;
|
||||
|
||||
public interface IRepository<TEntity>
|
||||
{
|
||||
ObservableCollection<TEntity> Get();
|
||||
TEntity Get(int id);
|
||||
bool Save(TEntity entity);
|
||||
}
|
||||
Reference in New Issue
Block a user