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
<script> | |
import { onMount } from "svelte"; | |
import axios from "axios"; | |
import config from "./config.js"; | |
import TodoItem from "./TodoItem.svelte"; | |
export let name; | |
let todo = ""; | |
$: todos = []; | |
onMount(getTodos()); | |
function getTodos() { |
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
namespace automapper_sample | |
{ | |
public class Student | |
{ | |
public string Name { get; set; } | |
public int Age { get; set; } | |
public string City { 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
namespace automapper_sample | |
{ | |
public class StudentDTO | |
{ | |
public string Name { get; set; } | |
public int Age { get; set; } | |
public string City { 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
using AutoMapper; | |
namespace automapper_sample | |
{ | |
public class AutoMapperProfile : Profile | |
{ | |
public AutoMapperProfile() | |
{ | |
CreateMap<StudentDTO, Student>(); | |
} |
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
using AutoMapper; | |
using Microsoft.AspNetCore.Mvc; | |
namespace automapper_sample.Controllers | |
{ | |
[Route("api/[controller]")] | |
public class StudentController : Controller | |
{ | |
private readonly IMapper _mapper; |
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
namespace automapper_sample | |
{ | |
public class AutoMapperProfile : Profile | |
{ | |
public AutoMapperProfile() | |
{ | |
CreateMap<StudentDTO, Student>() | |
.ForMember(dest => dest.City, opt => opt.MapFrom(src => src.CurrentCity)); | |
} | |
} |
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
namespace automapper_sample | |
{ | |
public class AddressDTO | |
{ | |
public string State { get; set; } | |
public string Country { 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
using AutoMapper; | |
namespace automapper_sample | |
{ | |
public class AutoMapperProfile : Profile | |
{ | |
public AutoMapperProfile() | |
{ | |
CreateMap<StudentDTO, Student>() | |
.ForMember(dest => dest.City, opt => opt.MapFrom(src => src.CurrentCity)); |
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
using AutoMapper; | |
namespace automapper_sample | |
{ | |
public class AutoMapperProfile : Profile | |
{ | |
public AutoMapperProfile() | |
{ | |
CreateMap<StudentDTO, Student>() | |
.ForMember(dest => dest.City, opt => opt.MapFrom(src => src.CurrentCity)) |
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
import React from 'react'; | |
import './App.css'; | |
import { Stack } from "@fluentui/react"; | |
function App() { | |
return ( | |
<div className="wrapper"> | |
<Stack horizontalAlign="center"> | |
<h1>Todo App using Fluent UI & React</h1> | |
<Stack style={{ width: 300 }} gap={25}> |