mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 11:07:41 +00:00
fix
This commit is contained in:
@@ -105,7 +105,7 @@ public class StudentRepository
|
|||||||
{
|
{
|
||||||
var newGoalId = Guid.NewGuid();
|
var newGoalId = Guid.NewGuid();
|
||||||
using var db = Connection;
|
using var db = Connection;
|
||||||
var rowsAffected = await db.ExecuteAsync(
|
var row = await db.QuerySingleOrDefaultAsync(
|
||||||
"sp_Goal_Insert",
|
"sp_Goal_Insert",
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
@@ -119,12 +119,12 @@ public class StudentRepository
|
|||||||
},
|
},
|
||||||
commandType: CommandType.StoredProcedure);
|
commandType: CommandType.StoredProcedure);
|
||||||
|
|
||||||
if (rowsAffected == 0) return null;
|
if (row is null) return null;
|
||||||
|
|
||||||
return new StudentGoalItem
|
return new StudentGoalItem
|
||||||
{
|
{
|
||||||
GoalId = newGoalId,
|
GoalId = newGoalId,
|
||||||
GoalParentId = null,
|
GoalParentId = dto.GoalParentId,
|
||||||
Title = dto.Title,
|
Title = dto.Title,
|
||||||
Description = dto.Description,
|
Description = dto.Description,
|
||||||
Category = dto.Category,
|
Category = dto.Category,
|
||||||
|
|||||||
Reference in New Issue
Block a user