-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from byerlikaya/refactor-and-package-update
Refactor and package update
- Loading branch information
Showing
24 changed files
with
670 additions
and
698 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
19 changes: 9 additions & 10 deletions
19
sample/Sample.Api/ApplicationSpecific/PublisherRepository.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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
using Sample.Api.ApplicationSpecific.Contexts; | ||
using Sample.Common.Entity; | ||
|
||
namespace Sample.Api.ApplicationSpecific | ||
namespace Sample.Api.ApplicationSpecific; | ||
|
||
public class PublisherRepository | ||
{ | ||
public class PublisherRepository | ||
{ | ||
private readonly MemoryDbContext _context = new(); | ||
private readonly MemoryDbContext _context = new(); | ||
|
||
public void AddRange(IEnumerable<Publisher> publishers) | ||
{ | ||
_context.AddRange(publishers); | ||
_context.SaveChanges(); | ||
} | ||
public void AddRange(IEnumerable<Publisher> publishers) | ||
{ | ||
_context.AddRange(publishers); | ||
_context.SaveChanges(); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
using Sample.Common; | ||
|
||
namespace Sample.Api | ||
namespace Sample.Api; | ||
|
||
public static class PublisherData | ||
{ | ||
public static class PublisherData | ||
public static void FillDummyData() | ||
{ | ||
public static void FillDummyData() | ||
{ | ||
PublisherRepository publisherRepository = new(); | ||
var publisher = DataInitializer.FillMockData().ToList(); | ||
publisherRepository.AddRange(publisher); | ||
} | ||
PublisherRepository publisherRepository = new(); | ||
var publisher = DataInitializer.FillMockData().ToList(); | ||
publisherRepository.AddRange(publisher); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
using Sample.Api.ApplicationSpecific.Contexts; | ||
using Sample.Common.Entity; | ||
|
||
namespace Sample.Api | ||
namespace Sample.Api; | ||
|
||
public class PublisherRepository | ||
{ | ||
public class PublisherRepository | ||
{ | ||
private readonly MemoryDbContext _context = new(); | ||
private readonly MemoryDbContext _context = new(); | ||
|
||
public void AddRange(IEnumerable<Publisher> publishers) | ||
{ | ||
_context.AddRange(publishers); | ||
_context.SaveChanges(); | ||
} | ||
public void AddRange(IEnumerable<Publisher> publishers) | ||
{ | ||
_context.AddRange(publishers); | ||
_context.SaveChanges(); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.