forked from Baud-UCS/DEF
-
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.
- Loading branch information
Showing
27 changed files
with
454 additions
and
211 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
18 changes: 18 additions & 0 deletions
18
...erver/DeploymentFramework/BusinessLogic/Domain/Deployment/Contracts/IServersRepository.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,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Baud.Deployment.BusinessLogic.Domain.Deployment.Entities; | ||
|
||
namespace Baud.Deployment.BusinessLogic.Domain.Deployment.Contracts | ||
{ | ||
public interface IServersRepository | ||
{ | ||
IQueryable<Server> GetServers(); | ||
|
||
Server GetServerDetail(int id); | ||
|
||
void UpdateServer(int id, Server server); | ||
} | ||
} |
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
38 changes: 38 additions & 0 deletions
38
src/Server/DeploymentFramework/Database/Deployment/ServersRepository.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,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Baud.Deployment.BusinessLogic.Domain.Deployment.Contracts; | ||
using Baud.Deployment.BusinessLogic.Domain.Deployment.Entities; | ||
using Baud.Deployment.BusinessLogic.Domain.Deployment.Queries; | ||
|
||
namespace Baud.Deployment.Database.Deployment | ||
{ | ||
public class ServersRepository : RepositoryBase<DeploymentDbContext>, IServersRepository | ||
{ | ||
public ServersRepository(DeploymentDbContext context) | ||
: base(context) | ||
{ | ||
} | ||
|
||
public IQueryable<Server> GetServers() | ||
{ | ||
return Context.Servers; | ||
} | ||
|
||
public Server GetServerDetail(int id) | ||
{ | ||
return Context.Servers.FilterByID(id).FirstOrDefault(); | ||
} | ||
|
||
public void UpdateServer(int id, Server server) | ||
{ | ||
server.ID = id; | ||
|
||
Context.AttachAsModified(server, | ||
x => x.Name, | ||
x => x.AgentUrl); | ||
} | ||
} | ||
} |
41 changes: 34 additions & 7 deletions
41
src/Server/DeploymentFramework/Resources/StringResources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.