forked from bpjohannessen/muscledb-web_old
-
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
26 changed files
with
891 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,28 @@ | ||
using System.Collections.Generic; | ||
public class ArteryDetails | ||
{ | ||
|
||
/// <summary> | ||
/// Gets or sets the Id (non-medical) of the artery. | ||
/// </summary> | ||
/// <returns></returns> | ||
|
||
//public long muscle_id { get; set; } | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the name of the artery. | ||
/// </summary> | ||
/// </summary> | ||
//public string Name { get; set; } | ||
public string Artery_Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the Latin name of the artery. | ||
/// </summary> | ||
/// </summary> | ||
//public string LatinName { get; set; } | ||
|
||
|
||
|
||
//public string artery_latinName { get; set; } | ||
public string Artery_latinName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the muscles supplied by this artery. | ||
/// </summary> | ||
|
||
public long Id { get; set; } | ||
|
||
public long Link_Muscle_Id { get; set; } | ||
|
||
public long Artery_Id { get; set; } | ||
|
||
public string Artery_Name { get; set; } | ||
|
||
public string Artery_latinName { get; set; } | ||
|
||
/// </summary> | ||
public ICollection<ArteryMuscle> ArteryMuscles { get; set; } | ||
|
||
|
||
} |
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,8 +1,18 @@ | ||
public class ArteryMuscle { | ||
|
||
|
||
/// <summary> | ||
/// Gets or sets the artery id | ||
/// </summary> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the artery name (English) | ||
/// </summary> | ||
public string Name { get; set; } | ||
public string LatinName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the artery name (Latin) | ||
/// </summary> | ||
public string LatinName { get; set; } | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
public class MuscleNerve { | ||
|
||
/// <summary> | ||
/// Gets or sets the nerve id | ||
/// </summary> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the nerve name (English) | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the nerve name (Latin) | ||
/// </summary> | ||
public string LatinName { get; set; } | ||
|
||
} |
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 @@ | ||
public class MuscleVein { | ||
|
||
/// <summary> | ||
/// Gets or sets the vein id | ||
/// </summary> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the vein name (English) | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the vein name (Latin) | ||
/// </summary> | ||
public string LatinName { get; set; } | ||
|
||
} |
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,28 @@ | ||
using System.Collections.Generic; | ||
public class NerveDetails | ||
{ | ||
|
||
/// <summary> | ||
/// Gets or sets the Id (non-medical) of the nerve. | ||
/// </summary> | ||
/// <returns></returns> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the name of the nerve. | ||
/// </summary> | ||
//public string Name { get; set; } | ||
public string Nerve_Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the Latin name of the nerve. | ||
/// </summary> | ||
//public string LatinName { get; set; } | ||
public string Nerve_latinName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the muscles supplied by this nerve. | ||
/// </summary> | ||
public ICollection<NerveMuscle> NerveMuscles { get; set; } | ||
|
||
} |
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 @@ | ||
public class NerveMuscle { | ||
|
||
/// <summary> | ||
/// Gets or sets the nerve id | ||
/// </summary> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the nerve name (English) | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the nerve name (Latin) | ||
/// </summary> | ||
public string LatinName { get; set; } | ||
|
||
} |
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,23 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.AspNetCore.Mvc; | ||
using System.Data; | ||
using DbReader; | ||
using System.Linq; | ||
|
||
[Route("api/[controller]")] | ||
public class NerveMusclesController : Controller | ||
{ | ||
private IDbConnection connection; | ||
|
||
public NerveMusclesController(IDbConnection connection) | ||
{ | ||
this.connection = connection; | ||
} | ||
|
||
[HttpGet("{id}")] | ||
public NerveDetails Get(int id) | ||
{ | ||
string sql = Sql.Get("NerveById"); | ||
return connection.Read<NerveDetails>(sql, new {Id = id}).SingleOrDefault(); | ||
} | ||
} |
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,28 @@ | ||
using System.Collections.Generic; | ||
public class VeinDetails | ||
{ | ||
|
||
/// <summary> | ||
/// Gets or sets the Id (non-medical) of the vein. | ||
/// </summary> | ||
/// <returns></returns> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the name of the vein. | ||
/// </summary> | ||
//public string Name { get; set; } | ||
public string Vein_Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the Latin name of the vein. | ||
/// </summary> | ||
//public string LatinName { get; set; } | ||
public string Vein_latinName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the muscles supplied by this vein. | ||
/// </summary> | ||
public ICollection<VeinMuscle> VeinMuscles { get; set; } | ||
|
||
} |
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 @@ | ||
public class VeinMuscle { | ||
|
||
/// <summary> | ||
/// Gets or sets the vein id | ||
/// </summary> | ||
public long Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the vein name (English) | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the vein name (Latin) | ||
/// </summary> | ||
public string LatinName { get; set; } | ||
|
||
} |
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,23 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.AspNetCore.Mvc; | ||
using System.Data; | ||
using DbReader; | ||
using System.Linq; | ||
|
||
[Route("api/[controller]")] | ||
public class VeinMusclesController : Controller | ||
{ | ||
private IDbConnection connection; | ||
|
||
public VeinMusclesController(IDbConnection connection) | ||
{ | ||
this.connection = connection; | ||
} | ||
|
||
[HttpGet("{id}")] | ||
public VeinDetails Get(int id) | ||
{ | ||
string sql = Sql.Get("VeinById"); | ||
return connection.Read<VeinDetails>(sql, new {Id = id}).SingleOrDefault(); | ||
} | ||
} |
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.