Two big refactorings done
This commit is contained in:
@ -18,7 +18,7 @@ namespace TrackerLibrary.DataAccess
|
||||
public class SqlConnector : IDataConnection
|
||||
{
|
||||
private const string db = "Tournaments";
|
||||
public PersonModel CreatePerson(PersonModel model)
|
||||
public void CreatePerson(PersonModel model)
|
||||
{
|
||||
using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(GlobalConfig.CnnString(db)))
|
||||
{
|
||||
@ -32,8 +32,6 @@ namespace TrackerLibrary.DataAccess
|
||||
connection.Execute("dbo.spPeople_Insert", p, commandType: CommandType.StoredProcedure);
|
||||
|
||||
model.Id = p.Get<int>("@Id");
|
||||
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,7 +41,7 @@ namespace TrackerLibrary.DataAccess
|
||||
/// </summary>
|
||||
/// <param name="model">The prize information.</param>
|
||||
/// <returns>The prize information, including the unique identifier.</returns>
|
||||
public Models.PrizeModel CreatePrize(Models.PrizeModel model)
|
||||
public void CreatePrize(Models.PrizeModel model)
|
||||
{
|
||||
using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(GlobalConfig.CnnString(db)))
|
||||
{
|
||||
@ -58,11 +56,10 @@ namespace TrackerLibrary.DataAccess
|
||||
|
||||
model.Id = p.Get<int>("@Id");
|
||||
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
public TeamModel CreateTeam(TeamModel model)
|
||||
public void CreateTeam(TeamModel model)
|
||||
{
|
||||
using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(GlobalConfig.CnnString(db)))
|
||||
{
|
||||
@ -84,7 +81,6 @@ namespace TrackerLibrary.DataAccess
|
||||
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user