Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
HIMS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sandeep Sagar
HIMS
Commits
3cf6ed3d
Commit
3cf6ed3d
authored
Oct 17, 2023
by
Sandeep Sagar Panjala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added repository
parent
923445b1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
287 additions
and
1 deletion
+287
-1
.gitignore
.gitignore
+0
-1
IDapperRepository.cs
Domain/Hims.Domian.Repositories/Dapper/IDapperRepository.cs
+0
-0
Hims.Domain.Repositories.csproj
.../Hims.Domian.Repositories/Hims.Domain.Repositories.csproj
+27
-0
ISqlGenerator.cs
...in/Hims.Domian.Repositories/SqlGenerator/ISqlGenerator.cs
+260
-0
IUnitOfWork.cs
Domain/Hims.Domian.Repositories/UnitOfWork/IUnitOfWork.cs
+0
-0
No files found.
.gitignore
View file @
3cf6ed3d
...
@@ -32,7 +32,6 @@ Properties
...
@@ -32,7 +32,6 @@ Properties
/Domain/Hims.Domian.Configurations/StyleCop.Cache
/Domain/Hims.Domian.Configurations/StyleCop.Cache
/Domain/Hims.Domian.Entities/StyleCop.Cache
/Domain/Hims.Domian.Entities/StyleCop.Cache
/Domain/Hims.Domian.Helpers/StyleCop.Cache
/Domain/Hims.Domian.Helpers/StyleCop.Cache
/Domain/Hims.Domian.Repositories
/Domain/Hims.Domian.Services/StyleCop.Cache
/Domain/Hims.Domian.Services/StyleCop.Cache
/Infrastructure/Hims.Infrastructure.Configurations/StyleCop.Cache
/Infrastructure/Hims.Infrastructure.Configurations/StyleCop.Cache
/Infrastructure/Hims.Infrastructure.Helpers/StyleCop.Cache
/Infrastructure/Hims.Infrastructure.Helpers/StyleCop.Cache
...
...
Domain/Hims.Domian.Repositories/Dapper/IDapperRepository.cs
0 → 100644
View file @
3cf6ed3d
This diff is collapsed.
Click to expand it.
Domain/Hims.Domian.Repositories/Hims.Domain.Repositories.csproj
0 → 100644
View file @
3cf6ed3d
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Hims.Domain.Repositories.xml</DocumentationFile>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Hims.Domain.Repositories.xml</DocumentationFile>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.TaskRunnerExplorer.14.0" Version="14.0.0" />
<PackageReference Include="TaskRunner" Version="1.0.0" />
<PackageReference Include="Webpack" Version="4.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Hims.Domian.Entities\Hims.Domain.Entities.csproj" />
</ItemGroup>
</Project>
Domain/Hims.Domian.Repositories/SqlGenerator/ISqlGenerator.cs
0 → 100644
View file @
3cf6ed3d
namespace
Hims.Domain.Repositories.SqlGenerator
{
using
System
;
using
System.Collections.Generic
;
using
System.Linq.Expressions
;
using
System.Reflection
;
using
Shared.Dapper.SqlGenerator
;
/// <summary>
/// Universal SqlGenerator for Tables
/// </summary>
/// <typeparam name="TEntity">
/// The entity.
/// </typeparam>
public
interface
ISqlGenerator
<
TEntity
>
where
TEntity
:
class
{
/// <summary>
/// Gets the all properties.
/// </summary>
PropertyInfo
[]
AllProperties
{
get
;
}
/// <summary>
/// Gets a value indicating whether has updated at.
/// </summary>
bool
HasUpdatedAt
{
get
;
}
/// <summary>
/// Gets the updated at property.
/// </summary>
PropertyInfo
UpdatedAtProperty
{
get
;
}
/// <summary>
/// Gets the updated at property metadata.
/// </summary>
SqlPropertyMetadata
UpdatedAtPropertyMetadata
{
get
;
}
/// <summary>
/// Gets a value indicating whether is identity.
/// </summary>
bool
IsIdentity
{
get
;
}
/// <summary>
/// Gets the table name.
/// </summary>
string
TableName
{
get
;
}
/// <summary>
/// Gets the table schema.
/// </summary>
string
TableSchema
{
get
;
}
/// <summary>
/// Gets the identity sql property.
/// </summary>
SqlPropertyMetadata
IdentitySqlProperty
{
get
;
}
/// <summary>
/// Gets the key sql properties.
/// </summary>
SqlPropertyMetadata
[]
KeySqlProperties
{
get
;
}
/// <summary>
/// Gets the sql properties.
/// </summary>
SqlPropertyMetadata
[]
SqlProperties
{
get
;
}
/// <summary>
/// Gets the sql join properties.
/// </summary>
SqlJoinPropertyMetadata
[]
SqlJoinProperties
{
get
;
}
/// <summary>
/// Gets the config.
/// </summary>
SqlGeneratorConfig
Config
{
get
;
}
/// <summary>
/// Gets a value indicating whether logical delete.
/// </summary>
bool
LogicalDelete
{
get
;
}
/// <summary>
/// Gets the status property name.
/// </summary>
string
StatusPropertyName
{
get
;
}
/// <summary>
/// Gets the logical delete value.
/// </summary>
object
LogicalDeleteValue
{
get
;
}
/// <summary>
/// The get count.
/// </summary>
/// <param name="predicate">
/// The predicate.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetCount
(
Expression
<
Func
<
TEntity
,
bool
>>
predicate
);
/// <summary>
/// The get count.
/// </summary>
/// <param name="predicate">
/// The predicate.
/// </param>
/// <param name="distinctField">
/// The distinct field.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetCount
(
Expression
<
Func
<
TEntity
,
bool
>>
predicate
,
Expression
<
Func
<
TEntity
,
object
>>
distinctField
);
/// <summary>
/// The get insert.
/// </summary>
/// <param name="entity">
/// The entity.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetInsert
(
TEntity
entity
);
/// <summary>
/// The get bulk insert.
/// </summary>
/// <param name="entities">
/// The entities.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetBulkInsert
(
IEnumerable
<
TEntity
>
entities
);
/// <summary>
/// The get update.
/// </summary>
/// <param name="entity">
/// The entity.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetUpdate
(
TEntity
entity
);
/// <summary>
/// The get update.
/// </summary>
/// <param name="predicate">
/// The predicate.
/// </param>
/// <param name="entity">
/// The entity.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetUpdate
(
Expression
<
Func
<
TEntity
,
bool
>>
predicate
,
TEntity
entity
);
/// <summary>
/// The get bulk update.
/// </summary>
/// <param name="entities">
/// The entities.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetBulkUpdate
(
IEnumerable
<
TEntity
>
entities
);
/// <summary>
/// The get select by id.
/// </summary>
/// <param name="id">
/// The id.
/// </param>
/// <param name="includes">
/// The includes.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetSelectById
(
object
id
,
params
Expression
<
Func
<
TEntity
,
object
>>[]
includes
);
/// <summary>
/// The get select first.
/// </summary>
/// <param name="predicate">
/// The predicate.
/// </param>
/// <param name="includes">
/// The includes.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetSelectFirst
(
Expression
<
Func
<
TEntity
,
bool
>>
predicate
,
params
Expression
<
Func
<
TEntity
,
object
>>[]
includes
);
/// <summary>
/// The get select all.
/// </summary>
/// <param name="predicate">
/// The predicate.
/// </param>
/// <param name="includes">
/// The includes.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetSelectAll
(
Expression
<
Func
<
TEntity
,
bool
>>
predicate
,
params
Expression
<
Func
<
TEntity
,
object
>>[]
includes
);
/// <summary>
/// The get select between.
/// </summary>
/// <param name="from">
/// The from.
/// </param>
/// <param name="to">
/// The to.
/// </param>
/// <param name="btwField">
/// The btw field.
/// </param>
/// <param name="expression">
/// The expression.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetSelectBetween
(
object
from
,
object
to
,
Expression
<
Func
<
TEntity
,
object
>>
btwField
,
Expression
<
Func
<
TEntity
,
bool
>>
expression
=
null
);
/// <summary>
/// The get delete.
/// </summary>
/// <param name="entity">
/// The entity.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetDelete
(
TEntity
entity
);
/// <summary>
/// The get delete.
/// </summary>
/// <param name="predicate">
/// The predicate.
/// </param>
/// <returns>
/// The <see cref="SqlQuery"/>.
/// </returns>
SqlQuery
GetDelete
(
Expression
<
Func
<
TEntity
,
bool
>>
predicate
);
}
}
\ No newline at end of file
Domain/Hims.Domian.Repositories/UnitOfWork/IUnitOfWork.cs
0 → 100644
View file @
3cf6ed3d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment