initial commit
This commit is contained in:
44
Repositories/InMemFamilyRepository.cs
Normal file
44
Repositories/InMemFamilyRepository.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using System.Linq;
|
||||
// using weddingapi.Models;
|
||||
|
||||
// namespace weddingapi.Repositories
|
||||
// {
|
||||
// public class InMemFamilyRepository : IFamilyRepository
|
||||
// {
|
||||
// private readonly List<Family> families = new()
|
||||
// {
|
||||
// new Family { Id = Guid.NewGuid(), Name = "Lol", CreatedDate = DateTimeOffset.UtcNow },
|
||||
// new Family { Id = Guid.NewGuid(), Name = "Lol1", CreatedDate = DateTimeOffset.UtcNow },
|
||||
// new Family { Id = Guid.NewGuid(), Name = "Lol2", CreatedDate = DateTimeOffset.UtcNow }
|
||||
// };
|
||||
|
||||
// public IEnumerable<Family> GetFamiliesAsync()
|
||||
// {
|
||||
// return families;
|
||||
// }
|
||||
|
||||
// public Family GetFamilyAsync(Guid id)
|
||||
// {
|
||||
// return families.Where(family => family.Id == id).SingleOrDefault();
|
||||
// }
|
||||
|
||||
// public void CreateFamilyAsync(Family family)
|
||||
// {
|
||||
// this.families.Add(family);
|
||||
// }
|
||||
|
||||
// public void UpdateFamilyAsync(Family family)
|
||||
// {
|
||||
// var index = families.FindIndex(existingFamily => existingFamily.Id == family.Id);
|
||||
// families[index] = family;
|
||||
// }
|
||||
|
||||
// public void DeleteFamilyAsync(Guid id)
|
||||
// {
|
||||
// var index = families.FindIndex(existingFamily => existingFamily.Id == id);
|
||||
// families.RemoveAt(index);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user