-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed a lot of classes so that they make more sense.
- Loading branch information
n.bitounis
committed
Jun 1, 2020
1 parent
cfc61bc
commit 1bf57ad
Showing
25 changed files
with
226 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ifications.DataAccess/Entities/SesSend.cs → ...tions.DataAccess/Entities/SesSendEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Projects/SesNotifications.DataAccess/Repositories/Interfaces/ISesOpensEventsRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using SesNotifications.DataAccess.Entities; | ||
|
||
namespace SesNotifications.DataAccess.Repositories.Interfaces | ||
{ | ||
public interface ISesOpensEventsRepository | ||
{ | ||
void Save(SesOpenEvent sesOpenEvent); | ||
SesOpenEvent FindById(long id); | ||
IList<SesOpenEvent> FindByMessageId(string messageId); | ||
IList<SesOpenEvent> FindBySentDateRange(DateTime start, DateTime end); | ||
IList<SesOpenEvent> FindByRecipient(string email); | ||
IList<SesOpenEvent> FindByRecipientAndSentDateRange(string email, DateTime start, DateTime end); | ||
} | ||
} |
16 changes: 0 additions & 16 deletions
16
Projects/SesNotifications.DataAccess/Repositories/Interfaces/ISesOpensRepository.cs
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
Projects/SesNotifications.DataAccess/Repositories/Interfaces/ISesSendEventsRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using SesNotifications.DataAccess.Entities; | ||
|
||
namespace SesNotifications.DataAccess.Repositories.Interfaces | ||
{ | ||
public interface ISesSendEventsRepository | ||
{ | ||
void Save(SesSendEvent sesSendEvent); | ||
SesSendEvent FindById(long id); | ||
IList<SesSendEvent> FindByMessageId(string messageId); | ||
IList<SesSendEvent> FindBySentDateRange(DateTime start, DateTime end); | ||
IList<SesSendEvent> FindByRecipient(string email); | ||
IList<SesSendEvent> FindByRecipientAndSentDateRange(string email, DateTime start, DateTime end); | ||
} | ||
} |
16 changes: 0 additions & 16 deletions
16
Projects/SesNotifications.DataAccess/Repositories/Interfaces/ISesSendsRepository.cs
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
Projects/SesNotifications.DataAccess/Repositories/SesOpensEventsRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using NHibernate; | ||
using NHibernate.Criterion; | ||
using SesNotifications.DataAccess.Entities; | ||
using SesNotifications.DataAccess.Repositories.Interfaces; | ||
|
||
namespace SesNotifications.DataAccess.Repositories | ||
{ | ||
public class SesOpensEventsRepository : Repository, ISesOpensEventsRepository | ||
{ | ||
|
||
public SesOpensEventsRepository() | ||
{ | ||
} | ||
|
||
public SesOpensEventsRepository(ISession session) : base(session) | ||
{ | ||
} | ||
|
||
public void Save(SesOpenEvent sesOpenEvent) | ||
{ | ||
Session.Save(sesOpenEvent); | ||
} | ||
|
||
public SesOpenEvent FindById(long id) | ||
{ | ||
return Session.Get<SesOpenEvent>(id); | ||
} | ||
|
||
public IList<SesOpenEvent> FindByMessageId(string messageId) | ||
{ | ||
return Session.CreateCriteria<SesOpenEvent>() | ||
.Add(Restrictions.Eq(nameof(SesOpenEvent.MessageId), messageId)) | ||
.List<SesOpenEvent>(); | ||
} | ||
|
||
public IList<SesOpenEvent> FindBySentDateRange(DateTime start, DateTime end) | ||
{ | ||
return Session.CreateCriteria<SesOpenEvent>() | ||
.Add(Restrictions.Ge(nameof(SesOpenEvent.SentAt), start)) | ||
.Add(Restrictions.Le(nameof(SesOpenEvent.SentAt), end)) | ||
.AddOrder(Order.Desc(nameof(SesOpenEvent.SentAt))) | ||
.List<SesOpenEvent>(); | ||
} | ||
|
||
public IList<SesOpenEvent> FindByRecipient(string email) | ||
{ | ||
return Session.CreateCriteria<SesOpenEvent>() | ||
.Add(Restrictions.InsensitiveLike(nameof(SesOpenEvent.Recipients), email)) | ||
.AddOrder(Order.Desc(nameof(SesOpenEvent.SentAt))) | ||
.List<SesOpenEvent>(); | ||
} | ||
|
||
public IList<SesOpenEvent> FindByRecipientAndSentDateRange(string email, DateTime start, DateTime end) | ||
{ | ||
return Session.CreateCriteria<SesOpenEvent>() | ||
.Add(Restrictions.InsensitiveLike(nameof(SesOpenEvent.Recipients), email)) | ||
.Add(Restrictions.Ge(nameof(SesOpenEvent.SentAt), start)) | ||
.Add(Restrictions.Le(nameof(SesOpenEvent.SentAt), end)) | ||
.AddOrder(Order.Desc(nameof(SesOpenEvent.SentAt))) | ||
.List<SesOpenEvent>(); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.