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 { Stack, Label } from '@fluentui/react'; | |
function TodoItem(props: any) { | |
return ( | |
<Stack> | |
<Stack horizontal verticalAlign="center" horizontalAlign="space-between"> | |
<Label>{props.todo.name}</Label> | |
</Stack> | |
</Stack> |
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 { Stack, Label } from "@fluentui/react"; | |
import TodoItem from './TodoItem'; | |
function TodoList(props:any) { | |
return ( | |
<Stack gap={10} > | |
{ props.todos.length > 0 ? props.todos.map((todo: any) => ( | |
<TodoItem todo={todo} key={todo.id}/> |
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 ReactDOM from 'react-dom'; | |
import './index.css'; | |
import App from './App'; | |
import * as serviceWorker from './serviceWorker'; | |
import { Fabric } from "@fluentui/react"; | |
ReactDOM.render( | |
<React.StrictMode> | |
<Fabric> |
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}> |
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
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
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; | |
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
using AutoMapper; | |
namespace automapper_sample | |
{ | |
public class AutoMapperProfile : Profile | |
{ | |
public AutoMapperProfile() | |
{ | |
CreateMap<StudentDTO, Student>(); | |
} |