public IActionResult GetBabies(int skip = 0, int take = 10) { var babiesResult = babiesService.GetBabies(skip, take); var response = new { items = babiesResult.Items .Select(b => new { id = b.Id, name = b.Name, genderType = b.GenderType, bloodType = b.BloodType, allergies = b.Allergies, notes = b.Notes, }), totalAmount = babiesResult.TotalAmount, }; return(Ok(response)); }
public IEnumerable <Baby> GetBabies() { var result = babiesService.GetBabies(); return(result); }