-
Notifications
You must be signed in to change notification settings - Fork 5
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
1 parent
3609f37
commit f1fff1e
Showing
15 changed files
with
221 additions
and
153 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
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,19 @@ | ||
using AutoMapper; | ||
|
||
namespace MyFinance.Mapping; | ||
|
||
public class UserProfile : Profile | ||
{ | ||
public UserProfile() | ||
{ | ||
CreateMaps(); | ||
} | ||
|
||
private void CreateMaps() | ||
{ | ||
CreateMap<OperationItem, OperationItemsVM>() | ||
.ForMember(dist => dist.Date, opt => opt.MapFrom(src => src.Date.ToString("dd.MM.yyyy HH:mm"))) | ||
.ForMember(dist => dist.Color, opt => opt.MapFrom(src => src.Color == nameof(Green) ? Green : Red)) | ||
.ForMember(dist => dist.Amount, opt => opt.MapFrom(src => $"{src.Amount} ₺")); | ||
} | ||
} |
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,11 @@ | ||
namespace MyFinance.Models; | ||
|
||
public class OperationItem : BaseModel | ||
{ | ||
public string Icon { get; set; } | ||
public string Title { get; set; } | ||
public string Description { get; set; } | ||
public DateTime Date { get; set; } | ||
public double Amount { get; set; } | ||
public string Color { 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,5 @@ | ||
namespace MyFinance.Repository; | ||
|
||
public interface IOperationItemsRepo : IRepo<OperationItem> | ||
{ | ||
} |
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,6 @@ | ||
| ||
namespace MyFinance.Repository; | ||
|
||
public class OperationItemsRepo(MyFinanceContext context) : Repo<OperationItem>(context), IOperationItemsRepo | ||
{ | ||
} |
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
2 changes: 1 addition & 1 deletion
2
MyFinance/VMs/OperatonItemsVM.cs → MyFinance/VMs/OperationItemsVM.cs
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
Oops, something went wrong.