DTO->Resouces

This commit is contained in:
Ruidy Nemausat 2020-03-03 16:29:23 +01:00
parent 2a693dfebd
commit 528e4d3b77
13 changed files with 14 additions and 14 deletions

View file

@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using TicketManager.Data; using TicketManager.Data;
using TicketManager.Models; using TicketManager.Models;
using TicketManager.DTO; using TicketManager.Resources;
namespace TicketManager.Controllers namespace TicketManager.Controllers

View file

@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using TicketManager.Data; using TicketManager.Data;
using TicketManager.Models; using TicketManager.Models;
using TicketManager.DTO; using TicketManager.Resources;
using System; using System;
namespace TicketManager.Controllers namespace TicketManager.Controllers

View file

@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using TicketManager.Data; using TicketManager.Data;
using TicketManager.DTO; using TicketManager.Resources;
using TicketManager.Models; using TicketManager.Models;
namespace TicketManager.Controllers namespace TicketManager.Controllers

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using TicketManager.Models; using TicketManager.Models;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class AppUserDTO public class AppUserDTO
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using TicketManager.Models; using TicketManager.Models;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class AppUserDTORead public class AppUserDTORead
{ {

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class NewAppUserDTO public class NewAppUserDTO
{ {

View file

@ -1,7 +1,7 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class NewProjectDTO public class NewProjectDTO
{ {

View file

@ -3,7 +3,7 @@ using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using TicketManager.Models; using TicketManager.Models;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class ProjectDTO public class ProjectDTO
{ {

View file

@ -3,7 +3,7 @@ using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using TicketManager.Models; using TicketManager.Models;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class ProjectDTORequest public class ProjectDTORequest
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using TicketManager.Models; using TicketManager.Models;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class NewTicketDTO public class NewTicketDTO
{ {

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using TicketManager.Models; using TicketManager.Models;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class TicketDTO public class TicketDTO
{ {
@ -20,7 +20,7 @@ namespace TicketManager.DTO
Difficulty = ticket.Difficulty.ToString(); Difficulty = ticket.Difficulty.ToString();
Category = ticket.Category.ToString(); Category = ticket.Category.ToString();
CreatorId = ticket.CreatorId; CreatorId = ticket.CreatorId;
Project = new ProjectDTORequest(ticket.Project); Project = ticket.Project != null ? new ProjectDTORequest(ticket.Project) : null;
Notes = ticket.Notes; Notes = ticket.Notes;
Activities = ticket.Activities; Activities = ticket.Activities;
Files = ticket.Files; Files = ticket.Files;

View file

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using TicketManager.Models; using TicketManager.Models;
namespace TicketManager.DTO namespace TicketManager.Resources
{ {
public class TicketDTORead public class TicketDTORead
{ {

View file

@ -8,7 +8,7 @@ using Microsoft.Data.Sqlite;
using TicketManager.Controllers; using TicketManager.Controllers;
using TicketManager.Data; using TicketManager.Data;
using TicketManager.Models; using TicketManager.Models;
using TicketManager.DTO; using TicketManager.Resources;
namespace TicketManager.Tests namespace TicketManager.Tests