creating oData client
testing odata interface
This commit is contained in:
54
API/Models/API.Models.csproj
Normal file
54
API/Models/API.Models.csproj
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8D72FF7D-C085-4C06-9D66-9537B7AC924D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Models</RootNamespace>
|
||||
<AssemblyName>Models</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Access.cs" />
|
||||
<Compile Include="Change.cs" />
|
||||
<Compile Include="File.cs" />
|
||||
<Compile Include="FileType.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Song.cs" />
|
||||
<Compile Include="SongType.cs" />
|
||||
<Compile Include="User.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
8
API/Models/Access.cs
Normal file
8
API/Models/Access.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace API.Models {
|
||||
public enum Access {
|
||||
Inactive,
|
||||
Reader,
|
||||
Writer,
|
||||
Admin
|
||||
}
|
||||
}
|
||||
11
API/Models/Change.cs
Normal file
11
API/Models/Change.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace API.Models {
|
||||
public class Change {
|
||||
public int ID { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
||||
10
API/Models/File.cs
Normal file
10
API/Models/File.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace API.Models {
|
||||
public class File {
|
||||
public int ID { get; set; }
|
||||
public Guid ReferenceFile { get; set; }
|
||||
public string Name { get; set; }
|
||||
public FileType FileType { get; set; }
|
||||
}
|
||||
}
|
||||
8
API/Models/FileType.cs
Normal file
8
API/Models/FileType.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace API.Models {
|
||||
public enum FileType {
|
||||
None,
|
||||
Sheet,
|
||||
Chords,
|
||||
MuseScore
|
||||
}
|
||||
}
|
||||
36
API/Models/Properties/AssemblyInfo.cs
Normal file
36
API/Models/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Models")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Models")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("8d72ff7d-c085-4c06-9d66-9537b7ac924d")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
17
API/Models/Song.cs
Normal file
17
API/Models/Song.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace API.Models {
|
||||
public class Song {
|
||||
public int ID { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Text { get; set; }
|
||||
public string Comments { get; set; }
|
||||
public string Key { get; set; }
|
||||
public int? Tempo { get; set; }
|
||||
public SongType SongType { get; set; }
|
||||
|
||||
public bool Final { get; set; }
|
||||
|
||||
public virtual ICollection<Change> Changes { get; set; }
|
||||
}
|
||||
}
|
||||
7
API/Models/SongType.cs
Normal file
7
API/Models/SongType.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace API.Models {
|
||||
public enum SongType {
|
||||
Praise,
|
||||
Worship
|
||||
}
|
||||
|
||||
}
|
||||
11
API/Models/User.cs
Normal file
11
API/Models/User.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace API.Models {
|
||||
public class User {
|
||||
public int ID { get; set; }
|
||||
public string Account { get; set; }
|
||||
public string Pass { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Surname { get; set; }
|
||||
public string Email { get; set; }
|
||||
public Access Access { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user