initial commit

This commit is contained in:
Julian
2022-01-23 19:20:13 +01:00
parent d4508520d4
commit 0e1b585db6
25 changed files with 758 additions and 0 deletions

View 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);
// }
// }
// }